In this case, a green candle will form and the next red candle that forms will have parameters that make it the "setup candle". Once the "setup candle" closes with the required parameters, the action candle will wait until price reaches a certain requirement before placing a short stop market order. Keep reading after the following screenshot...
You can see that Ninja Trader has a strategy builder in the following screenshot. It has a "conditions box" and an "action box" where you can build your strategy.
You can see the condition called "Short" that I created. The first couple of lines make sure that I'm not already in a trade before the conditions can continue. Lines 3-8 pertain to the preceding "green candle" AND the "setup candle", 1 and 0 respectively. These calculations will be made live during the candle movement on the chart. Once the "setup candle" closes, that's where the commands in the "action box" begin.
The actions would be:
- Buy contracts on the "action candle" at the LOW of the previous candle which is the "setup candle" -1 TickSize
- Exit position if the "action candle" price hits the HIGH of the previous candle which is the "setup candle"
This script actually gets me into the trade correctly, but it will not exit the trade based on the 2nd action in the list above.
I'm not sure if I have the logic setup correctly or not. Perhaps you can see what I'm attempting to do.
Comment