Universal MA Cross EA - page 90

 

Additional Filter

Hi mladen

I tried to use attached "BuySel Alert" indicator to replace "Third moving average".

When "x" said BUY, ma only go for buy,

When"x" said SELL, ma only go for sell.

but didn't worked.

Please help to verify

.

Below are " Buysel Alert" indicator:

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 White

#property indicator_width1 10

//---- input parameters

extern int barn=300;

extern int Length=30;// was 19

double prev;

double last;

double alertBar;

extern int SoundAlertMode = 1;

extern int Soundonly = 1;

extern bool targets = false;

//---- buffers

double ExtMapBuffer1[];

//double ExtMapBuffer2[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

SetIndexEmptyValue(0,0.0);

SetIndexDrawBegin(0, barn);

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,251);

SetIndexBuffer(0,ExtMapBuffer1);

IndicatorShortName("DIN");

So I use" iCustom()" to replace" iMA()":

//| THIRD MOVING AVERAGE |

//+------------------------------------------------------------------+

if(UseThirdMA==true)

{

ThirdMAValue = iCustom(NULL,0,"BuySel Alert",0,0);

if(UseCounterTrend==false)

{

if(BuyCondition==true && SlowMACurrent>ThirdMAValue) BuyCondition = true; else BuyCondition = false;

if(SellCondition==true && SlowMACurrent<ThirdMAValue) SellCondition = true; else SellCondition = false;

}

else

{

if((BuyCondition==true && FastMACurrent<ThirdMAValue) ||

(SellCondition==true && FastMACurrent>ThirdMAValue)) CounterTrend = true; else CounterTrend = false;

Thank you

 

Hey,

I don't see much difference in StopAndReverse and ExitOnCross or am I wrong?

 

How to really set a trailing profit in original universalMACross EA, cause it always hit my profit instead of let the profit run

 

Hi Guys,

In the last UniversalMAcross, can someone add a close_losing_position after x hours?

I keep having trades that are not closed with a serten setting: the stoplos is not added.

I have this problem with UseCounterTrend true.

And use third MA true.

Will share a good setfile!

 

Will share a good setfile!

I see that the problem i have is in the CT_stop.

Is it posible to give all positions the same stop, tp, and trailing rules?

I have e good setfile bud a view positions dont get closed and cause DD.

If the positions would be closed on a normal SL the results are more than very good!

Files:
chart.gif  40 kb
 
star821:
Hi mladen

I tried to use attached "BuySel Alert" indicator to replace "Third moving average".

When "x" said BUY, ma only go for buy,

When"x" said SELL, ma only go for sell.

but didn't worked.

Please help to verify

.

Below are " Buysel Alert" indicator:

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 White

#property indicator_width1 10

//---- input parameters

extern int barn=300;

extern int Length=30;// was 19

double prev;

double last;

double alertBar;

extern int SoundAlertMode = 1;

extern int Soundonly = 1;

extern bool targets = false;

//---- buffers

double ExtMapBuffer1[];

//double ExtMapBuffer2[];

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

//---- indicators

SetIndexEmptyValue(0,0.0);

SetIndexDrawBegin(0, barn);

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,251);

SetIndexBuffer(0,ExtMapBuffer1);

IndicatorShortName("DIN");

So I use" iCustom()" to replace" iMA()":

//| THIRD MOVING AVERAGE |

//+------------------------------------------------------------------+

if(UseThirdMA==true)

{

ThirdMAValue = iCustom(NULL,0,"BuySel Alert",0,0);

if(UseCounterTrend==false)

{

if(BuyCondition==true && SlowMACurrent>ThirdMAValue) BuyCondition = true; else BuyCondition = false;

if(SellCondition==true && SlowMACurrent<ThirdMAValue) SellCondition = true; else SellCondition = false;

}

else

{

if((BuyCondition==true && FastMACurrent<ThirdMAValue) ||

(SellCondition==true && FastMACurrent>ThirdMAValue)) CounterTrend = true; else CounterTrend = false;

Thank you

star821

Only now saw your post : you can not compare BuySell alert indicator with regular moving average, since most of the time BuySell alert has 0 as a value in the buffer and even when it has a value different than 0 it is not comparable with average in a normal way. They do not belong to a same family of indicators, sort of speaking, and that is why you can not compare them

 

Noted and Thank you mladen.

 

hi; mladen thank you for your help and improved ea.

paulc

 

EDIT: me too;

forgot the post, get something to post but its not to this ea. Sorry

thanks.

 

Testing it now and will report results my friends

Reason: