This EURUSD daily timeframe strategy is a simple code based mostly on the current trend detected by the difference of the Close with a simple moving average.
If the Close is above the SMA and the candlestick is green then we have a buy trading signal.
If Close is below the SMA and the candlestick is red, then this is a sell trading signal.
Seasonality parameters act as filters to prevent or not the launch of new orders at market, some days and months are not allowed to be traded.
Attached result is with 2 pips of spread. The strategy has no “0 bar” issue and could be backtested without the tick by tick mode to get a longer-term view of performance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
//------------------------------------------------------------------------- // Main code : eurusd_TF_daily //------------------------------------------------------------------------- DEFPARAM cumulateOrders = False // Cumulating positions deactivated ///parameter definition //inputs period = 7 dayforbiddenlong =4 dayforbiddenshort = 2 monthforbiddenlong =1 monthforbiddenshort =4 //variables mav = average[period](close) oscillator = close-mav rossa = (Dclose(0)-Dopen(0))<0 verde = (Dclose(0)-Dopen(0))>0 //entry condition cl = oscillator > 0 cl = cl and rossa cl = cl and dayofweek <> dayforbiddenlong and month <> monthforbiddenlong cs = oscillator<0 cs =cs and verde cs = cs and dayofweek <> dayforbiddenshort and month <> monthforbiddenshort IF cl THEN buy 1 PERPOINT AT MARKET ENDIF if cs then sellshort 1 perpoint at market endif |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Thanks for sharing. This does not give positive results n the daily timeframe (although it doers on the 4 hour). Am I missing something?
Change your timezone to the default one for forex.
Thanks!
great but… why don’t work on tick by tick mode?
is impossible to trade for real?
Hi Daisim, there is no need for tick to tick backtesting as there are no zero bars trades.
Thanks!!
You might try to use this strategy for platinum, looks good for the short run. (I only found a few months of data history, at IG.com)
Hi Francesco, nice strategy. Do you know if there are any members on this site that sell profitable automated trading systems?
Hello Paul,
please visit my website : http://www.automatictrading.it
Thanks Ale
Hi! thanks for sharing! Could you tell something about TP and SL conditions?
Its horrible !!
Hi Francesco
Just a question, how do you deal with interest costs of your broker, do you increase the spread to take the interest costs into account when being on the market all the time ?
Hi Francesco,
and where do you get the information of non trading months and non trading days of the week ? Thanks in advance !
once dayforbiddenlong =4
once dayforbiddenshort = 2
once monthforbiddenlong =1
once monthforbiddenshort =4
Jan Wind, I obtain it from the backtest
Hi Francesco,
The results are totally different with the tickbytick mode; it becomes a losing strategy; I don’t get why we should not use systematically this mode?
Thanks for your advice!
Takes to long!