Francesco78

EURUSD - a daily Timeframe simple trading strategy

Category: Strategies By: Francesco78 Created: February 13, 2018, 12:10 PM
February 13, 2018, 12:10 PM
Strategies
16 Comments
EURUSD - a daily Timeframe simple trading strategy

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.

//-------------------------------------------------------------------------
// 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

 

Download
Filename: eurusd-automatic-trading-results.png
Downloads: 676
Download
Filename: EURUSD-daily-TF-francesco78.itf
Downloads: 1045
Francesco78
Francesco78 Master
Code artist, my biography is a blank page waiting to be scripted. Imagine a bio so awesome it hasn't been coded yet.
Author’s Profile

Comments

UkDownUnder
6 years ago
#

Takes to long!

Francesco78
7 years ago
#

Jan Wind, I obtain it from the backtest

Kris75
7 years ago
#

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!

Jan Wind
7 years ago
#

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
7 years ago
#

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 ?

cryptotips tips
7 years ago
#

Its horrible !!

Michaldst
8 years ago
#

Hi! thanks for sharing! Could you tell something about TP and SL conditions?

ALE
ALE
8 years ago
#

Hello Paul, please visit my website : www.automatictrading.it Thanks Ale

PaulFM
8 years ago
#

Hi Francesco, nice strategy. Do you know if there are any members on this site that sell profitable automated trading systems?

JanWd
9 years ago
#

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)

Elperu
9 years ago
#

Thanks!!

Francesco78
9 years ago
#

Hi Daisim, there is no need for tick to tick backtesting as there are no zero bars trades.

Dalsim
9 years ago
#

great but... why don't work on tick by tick mode? is impossible to trade for real?

andtot
9 years ago
#

Thanks for sharing. This does not give positive results n the daily timeframe (although it doers on the 4 hour). Am I missing something?

Nicolas
9 years ago
#

Change your timezone to the default one for forex.

andtot
9 years ago
#

Thanks!

ProRealCode ProRealCode
Loading...