Page 1 of 2

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 780 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 !

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Mon Jul 26, 2021 4:25 am
by faboris
Hi All,

When the cross strategy is sending a BUY/SELL signal, is it possible to code another condition as below :

- When it is a BUY, price is closed above the MA. Wait the next candle and the next candle closing price has to be above the MA as well. If the closing price of the next candle is below the MA, it is not a BUY

- Same strategy for a SELL Signal

Many thanks

Boris

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Tue Jul 27, 2021 2:58 am
by Apprentice
Your request is added to the development list.
Development reference 683.

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Thu Jul 29, 2021 1:52 pm
by Apprentice
MA_Price_Cross_Touch_Strategy.Avignon.lua
(28.59 KiB) Downloaded 210 times

Try this version.

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Fri Jul 30, 2021 9:06 am
by faboris
That's great. Many Thanks

Can I ask you 1 last request ?

The signal is great but the price is not. Is it possible to code as the example below (in RED)

-When the buy signal is confirmed, the price entry should be at the low level of the Period-1
-Same logic for a SELL Signal

Thanks in advance

Boris

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Fri Jul 30, 2021 2:14 pm
by Apprentice
Your request is added to the development list.
Development reference 705.

Re: MA Price Cross Touch Strategy.Avignon

PostPosted: Wed Aug 04, 2021 4:38 am
by Apprentice
MA_Price_Cross_Touch_Strategy.Avignon.lua
(29.2 KiB) Downloaded 198 times

Try this version.