Increasing shift for iLow/iHigh

To add comments, please log in or register
g97iulio
304
g97iulio  

I need to increase shift for each new candle until shift=5, after it has to come back to 2 . This is the code :


{
         if(GetTime(TF1,9) != EMPTY_VALUE) LastSellSignalTF1 = GetTime(TF1,9);
         if(GetTime(TF1,7) != EMPTY_VALUE) LastBuySignalTF1 = GetTime(TF1,7);
         if(RSIDiv(TF1,0)>0 && RSIDiv(TF1,0)!=EMPTY_VALUE && iStochastic(Symbol(),PERIOD_M5,InpKPeriod,InpDPeriod,InpSlowing,MODE_SMA,STO_CLOSECLOSE,MODE_MAIN,Shift)>iStochastic(Symbol(),PERIOD_M5,InpKPeriod,InpDPeriod,InpSlowing,MODE_SMA,STO_CLOSECLOSE,MODE_SIGNAL,Shift)+StochDelta && iStochastic(Symbol(),PERIOD_M15,InpKPeriod,InpDPeriod,InpSlowing,MODE_SMA,STO_CLOSECLOSE,MODE_MAIN,Shift)>iStochastic(Symbol(),PERIOD_M15,InpKPeriod,InpDPeriod,InpSlowing,MODE_SMA,STO_CLOSECLOSE,MODE_SIGNAL,Shift)+StochDelta && 
            GetTime(TF1,6)>LastSellSignalTF1 && Bid<=iLow(Symbol(),TF1,2))
           {
            lastTime=(int)(GetTime(TF1,7)-GetTime(TF1,6));
            OrderEntry(0,"TF1 Trade",lastTime);
            trade1=0;
            int timen=(int)TimeCurrent();



And in particular this is the part :

(Bid<=iLow(Symbol(),TF1,2)
To add comments, please log in or register