MA cross/Price cross MA EA - page 4

William Snyder
9557
William Snyder  
sachin_syd:
they r required bcoz buy happens only when price candle closes above the high mov avg and sells when closes below low mov avg thanks!

You are correct they are required for that and its hard coded into the EA.

sachin_syd
139
sachin_syd  
mrtools:
You are correct they are required for that and its hard coded into the EA.

Pardon me MrTools but it seems I was unable to convey my requirement properly. Let me request again: So there will be 2 ma lines with price mode, type mode and period mode. Both MA lines will be set to same period mode (i.e. 30 etc) , both ma lines will be set to same type mode (i.e simple , exp , linear , or smooth) but both ma lines will have different price mode ( ie. one will be high another one will be low). As u will notice on the chart I posted earlier both ma lines are running parallel because of the above parameters. They never cross each other.

Now for entry/exit if bar closes above the ma with high it will be a buy and if it closes under the ma with low it will be a sell. (With simultaneous exit of the existing trade).

Therefore the EA will still need the price type function for me to setup high and low.

Your time and assistance is much appreciated. :-)

sachin_syd
139
sachin_syd  
mrtools:
Sachin_syd, Matimeframe, and Cltimeframe you can use the Ea on a higher timeframe than your Ea is set to, about the EA not closing the orders can you tell me what settings you are using, may help me to eliminate what is causing the problem.

MrTools were u able to identify the issue with this EA not closing and taking a reverse trade on trend change? Thanks

William Snyder
9557
William Snyder  
sachin_syd:
Pardon me MrTools but it seems I was unable to convey my requirement properly. Let me request again: So there will be 2 ma lines with price mode, type mode and period mode. Both MA lines will be set to same period mode (i.e. 30 etc) , both ma lines will be set to same type mode (i.e simple , exp , linear , or smooth) but both ma lines will have different price mode ( ie. one will be high another one will be low). As u will notice on the chart I posted earlier both ma lines are running parallel because of the above parameters. They never cross each other.

Now for entry/exit if bar closes above the ma with high it will be a buy and if it closes under the ma with low it will be a sell. (With simultaneous exit of the existing trade).

Therefore the EA will still need the price type function for me to setup high and low.

Your time and assistance is much appreciated. :-)

Satchin_syd, this is the high low ma version, but if you use anything but PRICE_HIGH on the upper Ma and anything besides PRICE_LOW on the lower Ma you are going to have problems with the close, this is why I hard coded this into the Ma Price on the last version I posted, to try and avoid this problem, but you want control of the price so now you have it.

To answer your last post when you originally said you wanted to add two more averages to the EA my thinking was ok he wants 2 more averages so in my mind, that means fast period Ma,medium period Ma, and slow period Ma the slow period Ma being the last to be crossed by price, this would be the actual cross, where the trade would open,so if the slow Ma cross happens and the fast and slow period Ma's are above/below the price then buy or sell would take place, but this would only work this way to close the orders correctly if you used only one of the prices, open,close,median, or typical on the Ma's and not high of low.So the close operates correctly if you use the same price on all the moving averages.Hopefully this helps to understand this somewhat.

sachin_syd
139
sachin_syd  

Ok Thanks a tonne. U have been very generous in helping me! Really appreciate your time and effort. I am struggling to setup a proper ea to generate regular income for several years.. I really do not have time to trade manual as in Australia its late night when US opens and during day I have a job.

I hope you will continue to assist as always. Please look into the original ma price cross ea issue i raised earlier when u have a moment.

William Snyder
9557
William Snyder  
sachin_syd:
Ok Thanks a tonne. U have been very generous in helping me! Really appreciate your time and effort. I am struggling to setup a proper ea to generate regular income for several years.. I really do not have time to trade manual as in Australia its late night when US opens and during day I have a job. I hope you will continue to assist as always. Please look into the original ma price cross ea issue i raised earlier when u have a moment.

No problem, about the original version, unless i am missing something think I explained about it in the second paragraph, the close on trend change works as long as you use the same price(except high/low) for the Ma's.

ps) BTW hopefully will be posting more EA's in the near future to give you all more of a choice.

sachin_syd
139
sachin_syd  
mrtools:
No problem, about the original version, unless i am missing something think I explained about it in the second paragraph, the close on trend change works as long as you use the same price(except high/low) for the Ma's. ps) BTW hopefully will be posting more EA's in the near future to give you all more of a choice.

I was referring you to look at the original Ea you posted much earlier on this thread where only 1 ma is used. On that EA the trade was not doing a close and reverse when price moved to the other side of ma. Sorry for the confusion.

William Snyder
9557
William Snyder  
sachin_syd:
I was referring you to look at the original Ea you posted much earlier on this thread where only 1 ma is used. On that EA the trade was not doing a close and reverse when price moved to the other side of ma. Sorry for the confusion.

Ohh ok yeah that version doesn't have that option,about time for me to get some rest, but will do it tomorrow, and post a new version there, with a link to it, here.Would be better than having versions scattered throughout the thread.

William Snyder
9557
William Snyder  

Sachin_syd, this would be the original, with the close on trend change added.Just ran it on back test and seems to be working ok.

sachin_syd
139
sachin_syd  
mrtools:
Satchin_syd, this is the high low ma version, but if you use anything but PRICE_HIGH on the upper Ma and anything besides PRICE_LOW on the lower Ma you are going to have problems with the close, this is why I hard coded this into the Ma Price on the last version I posted, to try and avoid this problem, but you want control of the price so now you have it. To answer your last post when you originally said you wanted to add two more averages to the EA my thinking was ok he wants 2 more averages so in my mind, that means fast period Ma,medium period Ma, and slow period Ma the slow period Ma being the last to be crossed by price, this would be the actual cross, where the trade would open,so if the slow Ma cross happens and the fast and slow period Ma's are above/below the price then buy or sell would take place, but this would only work this way to close the orders correctly if you used only one of the prices, open,close,median, or typical on the Ma's and not high of low.So the close operates correctly if you use the same price on all the moving averages.Hopefully this helps to understand this somewhat.

On trend reversal ea closes the open trade but The ea is not opening a new trade at the same time in opp direction. it opens it much later.. is it due to mabar or decresease factor settings? thanks