MA Cross lovers... gather here! - page 2

 

I love MAs. I just throw a simple moving average on the chart and trade on the price action. Place a bet and hope for a trend. That's trading for ya, it's not rocket science and I don't need 10 different filters. I usually don't trade on crosses because it seems to whip saw to death at times. I just try to take the middle chunk of the move, and avoid picking tops/bottoms.

 
ryanklefas:
Minor update: This one will only take one trade per bar.

Good Start- I will evaluate it on demo with my settings and modifications like RSI(14) over and under 50 on entry, 14/42 EMA MA's 15-min scale, TP=30, also the gap between the short and long ma > 2*Point on entry (eliminates false entries) - Must say, Real nice clean programming! Try using EURJPY / USDJPY / GBPJPY as the currency pairs. One last entry condition is that Open[0]>Close[1] or Open[0]<Close[1].

Dave

<<<

Since some crosses take time to widen before taking off, you may have to test various entry conditions on each current bar, and then check back several bars to see if an actual cross has taken place and then enter the trade - This took me a while to make this work. In your entry statement you have the current bar test, plus one bar back test for reverse condition. Just extend this by using a || (or) statement and test the bar back, and the reverse of this one bar back of the bar back bar.

Example of a setup entry statement to go long: (MAS = MA-Short) (MAL = MA-Long)

if(MAS>MAL && MAS_1MAL_1 && MAS_2MAL_2 && MAS_3MAL_3 && MAS_4MAL_4 && MAS_5<MAL_5)

if(RSI1>50)

if(Open[0]>Close[1] ) {

BuyValue=1;

}

I have enclose the modified file to test:

 

Hi Dave

Would it be possible for you to add an entry condition to this EA?

I'm thinking in terms of only permitting an entry when it is in the same direction as the Para Sar, with settings 0.013 & 0.2.

thanks.

 
 

A Little Clarificiation please?

Dave137:
Good Start- I will evaluate it on demo with my settings and modifications like RSI(14) over and under 50 on entry, 14/42 EMA MA's 15-min scale, TP=30, also the gap between the short and long ma > 2*Point on entry (eliminates false entries) - Must say, Real nice clean programming! Try using EURJPY / USDJPY / GBPJPY as the currency pairs. One last entry condition is that Open[0]>Close[1] or Open[0]<Close[1].

Dave

<<<

Since some crosses take time to widen before taking off, you may have to test various entry conditions on each current bar, and then check back several bars to see if an actual cross has taken place and then enter the trade - This took me a while to make this work. In your entry statement you have the current bar test, plus one bar back test for reverse condition. Just extend this by using a || (or) statement and test the bar back, and the reverse of this one bar back of the bar back bar.

Example of a setup entry statement to go long: (MAS = MA-Short) (MAL = MA-Long)

if(MAS>MAL && MAS_1MAL_1 && MAS_2MAL_2 && MAS_3MAL_3 && MAS_4MAL_4 && MAS_5<MAL_5)

if(RSI1>50)

if(Open[0]>Close[1] ) {

BuyValue=1;

}

I have enclose the modified file to test:

Hello Dave,

lol. 2 years later, I'm not even sure you still hang around here any more.

If you wouldn't mind, I'd like a little clarification of the following snippet quoted above:

if(MAS>MAL && MAS_1MAL_1 && MAS_2MAL_2 && MAS_3MAL_3 && MAS_4MAL_4 && MAS_5<MAL_5)

I don't understand where the MAS_3-5/MAL3-5 are supposed to originate from and this is the kind of check that I need in my code.

Thanks LOADS!

Dean

 

need 2 EMA cross + painting the cross candle

hi,

i got some EMA cross over indicators from here they are all good but there is problem with them ...

they show arrow when the values are equal and not crossing and if i switch the chart to another time frame and switch back the arrows disappear or change locations on other candles

any one could make EMA cross over that paint the candle instead of plotting arrow at the cross and fix the equal value cross, and when cross during price action the candle paints and on close also the candle paints ??

any help plz

thx

 

MA crossover candles

cableguy_mcm:
hi,

i got some EMA cross over indicators from here they are all good but there is problem with them ...

they show arrow when the values are equal and not crossing and if i switch the chart to another time frame and switch back the arrows disappear or change locations on other candles

any one could make EMA cross over that paint the candle instead of plotting arrow at the cross and fix the equal value cross, and when cross during price action the candle paints and on close also the candle paints ??

any help plz

thx

I am not quite sure what you mean by the values are equal and not crossingperhaps it is because the arrows are set to appear on the current time instead of the close? Try this and see if it is what you want.

extern int Timeframe = 0; MTF

extern bool Display_crossover_Only = true; False displays all candles

extern int MA_Period1 = 5;MA 1 inputs

extern int MA_Mode1 = 1;

extern int MA_Price1 = 0;

extern int MA_Period2 = 8;MA 2 inputs

extern int MA_Mode2 = 1;

extern int MA_Price2 = 0;

extern bool AlertsOn = false; True all Alerts are turned ON

extern bool AlertsOnCurrent = true; False Alerts on CLOSE

extern bool AlertsMessage = true; Popup window

extern bool AlertsSound = true;

extern bool AlertsEmail = false;

extern bool ShowComments = true; Displays comments top left of chart

ma_crossover_signal_candles.ex4

Files:
 

nice work. thank you very much. First time i made a ea and now testing. ryanklefas

 

My ea working on EU, but for crude oil shows this error: "Crude_Oil,M1: Error opening SELL order: 130". Any solution please.

Reason: