Quote:
Originally Posted by newdigital
shift is bar: 0 is current bar, 1 is previous bar.
It is if one MA is below the other MA 2 bar ago but above 1 bar ago - so it is the crossing.
It is the same as X/Y scale. 'Bar' is horizontal scale (same with time scale).
So we are having the value of MA indicator and when this value was taken (bar).
|
Thanks mate, but here "diMA0>=diMA1 && diMA2<diMA3 then OpenBuy()" where
double diMA0=iMA(NULL,0,MAsmall,0,MAsmallMode,PRICE_CLOSE ,0);
double diMA1=iMA(NULL,0,MAbig,0,MAbigMode,PRICE_CLOSE,0);
double diMA2=iMA(NULL,0,MAsmall,0,MAsmallMode,PRICE_CLOSE ,1);
double diMA3=iMA(NULL,0,MAbig,0,MAbigMode,PRICE_CLOSE,1);
so that means that when current bar is abiove or equal to previous one (means its heading up) and MA2 (which is fast i believe) is lower then MA2 (slower) then buy??? I thought when slower is crossing below then its a buy order - shouldnt the logic be diMA0>=diMA1 && diMA2
>diMA3 then OpenBuy ????
or should i change the following variables to
extern double MAsmall = 25;
extern double MAbig = 10; ????