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

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: 674
Download
Filename: EURUSD-daily-TF-francesco78.itf
Downloads: 1039
Francesco78 Master
This author is like an anonymous function, present but not directly identifiable. More details on this code architect as soon as they exit 'incognito' mode.
Author’s Profile

Comments

Logo Logo
Loading...