DANYParticipant
Senior
The Markets grow in the night !
Very Simple Code based on Entry & Exit Time combined with a daily MM200.
Any Idea to increase profitability ?
DEFPARAM cumulateorders=false
LSTime=183000
LETime=073000
SSTime=143000
SETime=173000
ExitTime=213000
EntraLong=1
EntraShort=1
MyStopLoss=90
MyTakeProfit=400
TIMEFRAME (Daily, updateonclose)
//your daily conditions
MM200=Average[200](Close)
DLong=DClose(1)>MM200
DShort=DClose(1)<MM200
TIMEFRAME (default)
If EntraLong AND Time=LSTime AND DLong then
buy 1 contract at market
endif
If EntraShort AND Time=SSTime AND DShort then
sellshort 1 contract at market
endif
If LongOnMarket AND (Time=LETime OR Close<MM200) then
sell at market
endif
If ShortOnMarket AND (Time=SETime OR Close>MM200) then
exitshort at market
endif
If MyStopLoss>0 then
Set Stop PLoss MyStopLoss
endif
If MyTakeProfit>0 then
Set Target PProfit MyTakeProfit
endif
If DayOfWeek=5 and Time=ExitTime then
sell at market
exitshort at market
endif
Hi Dany, thanks for posting your strategy. Sorry if I’m wrong but I feel you did not use any spread fees into your backtest?
DANYParticipant
Senior
Ciao Nicolas,
I used 1 point spread, but it does work fine with 2 point too; I think that with some filters (maybe one or two patterns), it could be increase the average profitability.
It’s work better if you set the SL & TP at “0” value and if you comment the last filter, like this :
If DayOfWeek=5 and Time=ExitTime then
//sell at market
//exitshort at market
endif
Oh sorry! I successfully backtest your system with the same result. I should not work on Sunday 😆
PFA comparison with buy and hold (but with no fees).
I like this bias strategy. Can I ask for the screener code? Thanks indeed.