I'm currently working on a strategy that is utilizing OnTickChange data using the linked method. I am using a Tick Chart.
https://ninjatrader.com/support/forum/forum/ninjatrader-8/strategy-development/1116662-identifying-a-bar-close-in-an-on-price-change-strategy
The strategy uses onTickChange to make intrabar entry, and does so fine with the Set1 and Set2, but if/when profit target is hit, it will submit another order after the profit target if the conditions are still true and this is happening on the same bar.
1) What conditions or actions do I need to add to allow it to take only 1 entry per bar, but still use intrabar data to take entry?
2) What if I wanted it to take up to 2 entries?
3) If already in a position, and the price moves to cross an indicator, let's say an EMA, how can I close the entry and not take more entries on the same bar even if the entry conditions are still true?
I want to limit the number of trades it can take on a single bar, either based on an exit condition being met intrabar, or limit how many entries it can make during a bar.
Further, am I able to express that if an entry was taken near the low of the same bar it took entry within (x) number of ticks, it forces an exit on the next bar? I am already forcing an exit using BarsSinceEntryExecution and a number of bars to force exit as an input, but I'd like it to be more granular and exit before the bar closes if certain conditions are met.
I should add that I am not skilled at code, and if a working solution can be made with the strategy builder that would be most helpful.
Thanks kindly,
Comment