I am trying to program that after the event (which I have already programmed) then go long on the close of the first bull candle (close > open). I thought it should be something like:
EnterLongLimit(Close [n]);
But I need to specify what n is: n=first bull candle after "event". So if my event is: Close [0] < Close [1] for example then it should be something like:
{
(Close [0] < Close [1]
&& Close [n] > Open [n]
n=any candle after 0)
}
EnterLongLimit(Close [n]);
I am not sure how this can be accomplished using the programming language of Ninja. So some guidelines would be appreciated, or the actual code.
Reading through some code I found that there is a statement : bullFound = true;
I am wondering if I can use this to accomplish what I am trying to do. If so please guide me in how and where this statement has to be entered to accomplish what I am trying to do.
Thankyou.

Comment