check arrow

 

Hello Guys,

I need your help to modify a parameter of my strategy.

My strategy is composed in 3 indicators which don't match in the same time.

I would like to memorize the sense given by the arrow few candles ago :

   //---Arrows
   double MHLong = iCustom(NULL,0,"Arrows",1000,1,0);

   double MHShort = iCustom(NULL,0,"Arrows",1000,0,0);

I am sure the problem comes from the last "0" -> shift

Your help will be appreciated


thanks

 
fredofrompaca:

Hello Guys,

I need your help to modify a parameter of my strategy.

My strategy is composed in 3 indicators which don't match in the same time.

I would like to memorize the sense given by the arrow few candles ago :

   //---Arrows
   double MHLong = iCustom(NULL,0,"Arrows",1000,1,0);

   double MHShort = iCustom(NULL,0,"Arrows",1000,0,0);

I am sure the problem comes from the last "0" -> shift

Your help will be appreciated


thanks


0 is for the current bar, it's always changing.

Maybe you have to use 1 as shift, it's the last closed candle.

 

thanks angevoyageur.

I would like to check every last five candles to check if the arrow is up or down

Reason: