incorrect chinou span alert

 

I have some code which creates a little symbol indicator with buy/sell values.

In this example the chinkou green line is above the price so it should be displaying an up arrow but it does not. Any ideas on what I have set incorrectly?

The chinkou is always 26 periods behind so that is why I checkk the iClose of 26 periods ago:

   for(x=0;x<6;x++)
   {
      if(iIchimoku(Symbol(), period[x], 9, 26, 52, MODE_CHINKOUSPAN, 0) > iClose(Symbol(), period[x], 26))
         ObjectSetText("signal"+x+"2",CharToStr(symbolCodeBuy),fontSize,
         "Wingdings",signalBuyColor);   
      else if(iIchimoku(Symbol(), period[x], 9, 26, 52, MODE_CHINKOUSPAN, 0) < iClose(Symbol(), period[x], 26))
         ObjectSetText("signal"+x+"2",CharToStr(symbolCodeSell),fontSize,
         "Wingdings",signalSellColor);   
      else
         ObjectSetText("signal"+x+"2",CharToStr(symbolCodeNoSignal),fontSize,
         "Wingdings",noSignalColor);      
   }


 
SanMiguel:

I have some code which creates a little symbol indicator with buy/sell values.

In this example the chinkou green line is above the price so it should be displaying an up arrow but it does not. Any ideas on what I have set incorrectly?

The chinkou is always 26 periods behind so that is why I checkk the iClose of 26 periods ago:

Is this an error in the iIchimoku?

We have already set the period of 26 so when we use MODE_CHINKOUSPAN it should pick up the avlue. To get the correct value I had to put in the shift period of 26 behind it AS WELL.