Thanks mate.
I getting errors in the first five lines bro. Variable 'buy' used without having been initialized. And same errors for the other four lines too.
I getting errors in the first five lines bro. Variable 'buy' used without having been initialized. And same errors for the other four lines too.
Earlier code was for Augubhai Sir's ORB system v1.1
this code is for Moving Average Exploration
Code:
_SECTION_BEGIN("Moving Average Exploration");
MA20=MA(C, 20);
MA50=MA(C, 50);
MA100=MA(C,100);
MA200=MA(C,200);
buycond = C>MA20 AND MA20>MA50 AND MA50>MA100 AND MA100>MA200;
sellcond = C<MA20 AND MA20<MA50 AND MA50<MA100 AND MA100<MA200;
Buy=Cover= buycond;
Sell = Short = sellcond;
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
Filter = Buy OR Sell OR Short OR Cover;
AddColumn(Close, "Close", 1.2);
AddColumn(Volume, "Volume", 1.2);
AddColumn(MA(C, 9), "MA9");
AddColumn(MA(C, 20), "MA20");
AddColumn(MA(C, 50), "MA50");
AddColumn(MA(C, 100), "MA100");
AddColumn(MA(C, 200), "MA200");
AddColumn(IIf(Buy,c,Null),"Buy",1.2);
AddColumn(IIf(Sell,c,Null),"Sell",1.2);
AddColumn(IIf(Short,c,Null),"Short",1.2);
AddColumn(IIf(Cover,c,Null),"Cover",1.2);
_SECTION_END();