Page 1 of 1

MA Price Cross Touch Strategy.Avignon

PostPosted: Tue Nov 06, 2018 7:11 am
by Apprentice
1.png

2.png

Opening and close the trade when the price touches or crosses the shortest moving average
but only if the longest moving average confirms the trend.
MA Price Cross Touch Strategy.Avignon.lua
(27.2 KiB) Downloaded 288 times

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Tue Nov 06, 2018 12:21 pm
by Avignon
The closing of the trade was not done.

Capture du 2018-11-06 15-47-31.png

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Tue Nov 06, 2018 1:21 pm
by Avignon
Or it's a bug, or there must be something to optimize under the conditions in lines of code because it worked.

Capture du 2018-11-06 17-14-57.png

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Wed Jan 23, 2019 8:52 am
by Jyuken
Hey apprentice !

Thank you so much for this strategy, I love it and have some good result with it. However I though about a way to improve it and saw some flaws in the positions taken sometimes.

For example here :
the first position was good : buying when short MA > long MA and price cross from the bottom the short MA
the second position was good : selling when short MA < long MA and price cross from the top the short MA
However the third one bothers me : buying because price cross short MA from the bottom despite of the fact that long MA > short MA

So maybe I misunderstood but what do you mean by "if the longest moving average confirms the trend" ?

Moreover I thought about a filter that would improve this strategy : if there is less than n pips separating the two moving average then we do not open a trade. Would it be possible to add that to this strategy ?

Thank you so much for your work, have a wonderful day !