NexusFi: Find Your Edge


Home Menu

 





Manual pre-trigger for automated entry and exit?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one skellington with 3 posts (1 thanks)
    2. looks_two Jasonnator with 2 posts (1 thanks)
    3. looks_3 Sandpaddict with 2 posts (0 thanks)
    4. looks_4 trendisyourfriend with 1 posts (0 thanks)
    1. trending_up 1,253 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 7 posts
    2. attach_file 0 attachments




 
Search this Thread

Manual pre-trigger for automated entry and exit?

  #1 (permalink)
 skellington 
San Jose, CA
 
Experience: Intermediate
Trading: Futures
Posts: 32 since May 2021
Thanks Given: 36
Thanks Received: 37

Wondering if this is possible in NinjaTrader,

I trade against fast moving data (like 200 tick charts ES) and am looking for a way to do this:

- Manually set a strategy to ARMED when I feel like conditions are good
- Then have the strategy trigger based on whatever conditions are in the strategy
- Take manual control over the automated strategy if needed (so stop the automation but keep the last orders active with ability to move the orders around on the chart like usual)
- otherwise, let the strategy complete and go into an UNARMED state

Maybe this is as simple as enabling/disabling a strategy by hand? But depending on the interface this could be clear/simple or an annoying amount of clicks. I need it to be fast.

Main point is, I want to manually ARM the system and then let it buy/sell when strategy says. Things move too quickly for me to start the thing based on timing chart candle moves at 200tick charts, but i can see setups in advance.


Is this possible with default NT or would this take a bunch of custom programming?

Thanks!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
How to apply profiles
Traders Hideout
What broker to use for trading palladium futures
Commodities
MC PL editor upgrade
MultiCharts
 
  #2 (permalink)
 
trendisyourfriend's Avatar
 trendisyourfriend 
Quebec Canada
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG
Trading: ES, NQ, YM
Frequency: Daily
Duration: Minutes
Posts: 4,527 since Oct 2009
Thanks Given: 4,176
Thanks Received: 6,020


skellington View Post
Wondering if this is possible in NinjaTrader,
...

Is this possible with default NT or would this take a bunch of custom programming?

Thanks!

You can use a strategy to trigger an order with an ATM template of your choice attached to it. Once the order is working, you can disable the strategy and still manually modify the stop and target. Obviously, you would need some programming to define your entry conditions. Check the SampleAtmStrategy that comes with Ninjatrader for an example.

Ideally, you don't want to disable/enable the strategy but define the logic for the armed/re-armed conditions.

Reply With Quote
  #3 (permalink)
 skellington 
San Jose, CA
 
Experience: Intermediate
Trading: Futures
Posts: 32 since May 2021
Thanks Given: 36
Thanks Received: 37


Once armed, and the strategy triggers, after it's done one 'trade' can it automatically go back into an unarmed state?

I assume you could do this sort of thing with custom programming if nothing else.

Started this thread Reply With Quote
Thanked by:
  #4 (permalink)
 
Sandpaddict's Avatar
 Sandpaddict 
Vancouver, Canada
 
Experience: Advanced
Platform: Ninjatrader, MT4
Broker: IB, Global Prime
Trading: Futures CFDs
Posts: 684 since Mar 2020
Thanks Given: 975
Thanks Received: 637


skellington View Post
Wondering if this is possible in NinjaTrader,

I trade against fast moving data (like 200 tick charts ES) and am looking for a way to do this:

- Manually set a strategy to ARMED when I feel like conditions are good
- Then have the strategy trigger based on whatever conditions are in the strategy
- Take manual control over the automated strategy if needed (so stop the automation but keep the last orders active with ability to move the orders around on the chart like usual)
- otherwise, let the strategy complete and go into an UNARMED state

Maybe this is as simple as enabling/disabling a strategy by hand? But depending on the interface this could be clear/simple or an annoying amount of clicks. I need it to be fast.

Main point is, I want to manually ARM the system and then let it buy/sell when strategy says. Things move too quickly for me to start the thing based on timing chart candle moves at 200tick charts, but i can see setups in advance.


Is this possible with default NT or would this take a bunch of custom programming?

Thanks!

I have used software for this. It's quite remarkable. It's called MPTpredictor. You can Google it.

It gives you the ability to set up entry, stop and targets and move all around without being live.

Once you are happy you just wait and click one button and it "activates" orders. There are many other features and the author has his own way to trade attached to the software which is kind of annoying but it's such good software.





Sent using the NexusFi mobile app

Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 
Jasonnator's Avatar
 Jasonnator 
Denver, Colorado United States
 
Experience: Intermediate
Platform: NT8 + Custom
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 159 since Dec 2014
Thanks Given: 40
Thanks Received: 166

This can be easily done with code examples you could splice together. Here is a sample of adding a button to your chart and covers several of the gotchas so you don't crash your platform. I would recommend 2 buttons, one to enable, one to disable allowing new trades. Those button could simply set a bool value (maybe allowOpenNewTrades) in your strategy. That bool value could be wrapped in an if statement and that if block would encompass all of your trade entry logic. I'd probably not expose this as a property and set it to false in State.SetDefaults and only allow the button's click handler change its value.

I recommend doing it this way because you indicated you only wanted to prevent entries and it sounds like you want your automation to still manage any open trades. Also, you never have to worry about enabling disabling the strategy itself. This would only prevent new automated trade entries.

How I develop my trading tools: How to videos
Latest: Trading hours and Mid price

Free code: GitLab repository
Reply With Quote
Thanked by:
  #6 (permalink)
 
Sandpaddict's Avatar
 Sandpaddict 
Vancouver, Canada
 
Experience: Advanced
Platform: Ninjatrader, MT4
Broker: IB, Global Prime
Trading: Futures CFDs
Posts: 684 since Mar 2020
Thanks Given: 975
Thanks Received: 637


Jasonnator View Post
This can be easily done with code examples you could splice together. Here is a sample of adding a button to your chart and covers several of the gotchas so you don't crash your platform. I would recommend 2 buttons, one to enable, one to disable allowing new trades. Those button could simply set a bool value (maybe allowOpenNewTrades) in your strategy. That bool value could be wrapped in an if statement and that if block would encompass all of your trade entry logic. I'd probably not expose this as a property and set it to false in State.SetDefaults and only allow the button's click handler change its value.

I recommend doing it this way because you indicated you only wanted to prevent entries and it sounds like you want your automation to still manage any open trades. Also, you never have to worry about enabling disabling the strategy itself. This would only prevent new automated trade entries.



Sent using the NexusFi mobile app

Visit my NexusFi Trade Journal Reply With Quote
  #7 (permalink)
 skellington 
San Jose, CA
 
Experience: Intermediate
Trading: Futures
Posts: 32 since May 2021
Thanks Given: 36
Thanks Received: 37


Jasonnator View Post
This can be easily done with code examples you could splice together. Here is a sample of adding a button to your chart and covers several of the gotchas so you don't crash your platform. I would recommend 2 buttons, one to enable, one to disable allowing new trades. Those button could simply set a bool value (maybe allowOpenNewTrades) in your strategy. That bool value could be wrapped in an if statement and that if block would encompass all of your trade entry logic. I'd probably not expose this as a property and set it to false in State.SetDefaults and only allow the button's click handler change its value.

I recommend doing it this way because you indicated you only wanted to prevent entries and it sounds like you want your automation to still manage any open trades. Also, you never have to worry about enabling disabling the strategy itself. This would only prevent new automated trade entries.

That's great, thanks! That does sound like an approach that would work (not sure I need two buttons), have the automation 'running' but internally set it to respond to the ARMED button, process a single trade (blocking other new trades and setting the button text to WORKING if possible) until complete, then set the ARMED button back to the waiting state.

Started this thread Reply With Quote
  #8 (permalink)
 
Jasonnator's Avatar
 Jasonnator 
Denver, Colorado United States
 
Experience: Intermediate
Platform: NT8 + Custom
Broker: NT Brokerage, Kinetick, IQFeed, Interactive Brokers
Trading: ES
Posts: 159 since Dec 2014
Thanks Given: 40
Thanks Received: 166

Yeah, you could definitely do it all with 1 button fairly easy. Good luck!

How I develop my trading tools: How to videos
Latest: Trading hours and Mid price

Free code: GitLab repository
Reply With Quote




Last Updated on May 31, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts