Hello, Help please with code to get signal from Indicator into an EA,
I have tried many different combination of code to get the signal from this MA_Averages indicator to signal Buy and Sell in an EA, yet without joy,
Buy = ((ma_trend_current!=ma_trend_previous) & (ma_trend_current==1));
Sell = ((ma_trend_current!=ma_trend_previous) & (ma_trend_current==0));
or
Buy = (ma_trend_current > 0);
Sell = (ma_trend_previous < 0);
extern int BarToUse = 0;
Could some please have a look and help?
Indicator attached
double ma_trend_current = iCustom(NULL,0,"MA_Averages",MaType,PriceFirstList,MaPriceSecondList,MaLength,Sensitivity,StepMaPrice,ATRScaling,5,BarToUse);
double ma_trend_previous = iCustom(NULL,0,"MA_Averages",MaType,PriceFirstList,MaPriceSecondList,MaLength,Sensitivity,StepMaPrice,ATRScaling,5,BarToUse+1);
I have tried many different combination of code to get the signal from this MA_Averages indicator to signal Buy and Sell in an EA, yet without joy,
Buy = ((ma_trend_current!=ma_trend_previous) & (ma_trend_current==1));
Sell = ((ma_trend_current!=ma_trend_previous) & (ma_trend_current==0));
or
Buy = (ma_trend_current > 0);
Sell = (ma_trend_previous < 0);
extern int BarToUse = 0;
Could some please have a look and help?
Indicator attached
double ma_trend_current = iCustom(NULL,0,"MA_Averages",MaType,PriceFirstList,MaPriceSecondList,MaLength,Sensitivity,StepMaPrice,ATRScaling,5,BarToUse);
double ma_trend_previous = iCustom(NULL,0,"MA_Averages",MaType,PriceFirstList,MaPriceSecondList,MaLength,Sensitivity,StepMaPrice,ATRScaling,5,BarToUse+1);
Attached File(s)
MA_Averages.mq4
35 KB
|
258 downloads