Type : Signal, Name : Macd RS Ratio
Inputs:
R(12),
S(26),
Q(9),
Price(close of data1/close of data2);
Vars:
Mo(0),
Avg(0);
Mo=MACD(Price,R,S);
Avg=Xaverage(MACD(Price,R,S),Q);
Condition1=Mo crosses above 0;
Condition2=Mo crosses below 0;
Condition3=Mo>0;
Condition4=Mo<0;
If Condition1 then buy 1 contract on close;
If Condition2 then sell 1 contract on close;