Oops, I’ve been running it with select=2 on 15m …. and it still made $100 today. Very nice!
But should the tds value correspond to the select value? or is it just an optional on/off ?
I’ve been running it with select=2 on 15m
Well double check on my logic as I may be wrong? Try it with select = 2 on 30 mins … is it bigger profit?
TDS is the Trend Detection System and so needs to be same as Trend value in the optimiser.
Select=2 is def better at 15m. I’m running the juju333 version at 30m … also outstanding.
Hi, i’ve turned partial closure off and slightly optimized for EURCAD and M30. Too good to be true, but i share it (running in demo mode from this morning). Indeed take care of drawdown… :
DEFPARAM CumulateOrders = False
DEFPARAM PRELOADBARS = 10000
daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
Horaire = time >= 000000 and time <= 220000
PositionsizeA = 1
PositionsizeV = 1
MM = Average[56,3](totalprice)
Newhighest=max(DHigh(0), DHigh(1))
Newlowest=min(DLow(0), DLow(1))
Milieu = (Newhighest+Newlowest)/2
Surachat = average[10,4]((Newhighest+Milieu)/2)
Survente = average[10,4]((Newlowest+Milieu)/2)
CA = (MM > Surachat) and (close crosses over Milieu)
CV = (MM < Survente) and (close crosses under Milieu)
// Long Entries
IF Horaire AND CA AND not daysForbiddenEntry AND NOT SHORTONMARKET THEN
BUY PositionsizeA CONTRACTS AT MARKET
ENDIF
IF LONGONMARKET THEN
SELL AT TRADEPRICE +540*pointsize LIMIT
ENDIF
// Short Entries
IF Horaire AND CV AND not daysForbiddenEntry AND NOT LONGONMARKET THEN
SELLSHORT PositionsizeV CONTRACTS AT MARKET
ENDIF
IF SHORTONMARKET THEN
EXITSHORT AT TRADEPRICE – 50*pointsize LIMIT
ENDIF
//MFE
//trailing stop
trailingstop = 40
//resetting variables when no trades are on market
if not onmarket then
MAXPRICE = 0
MINPRICE = close
priceexit = 0
endif
//case SHORT order
if shortonmarket then
MINPRICE = MIN(MINPRICE,close) //saving the MFE of the current trade
if tradeprice(1)–MINPRICE>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
priceexit = MINPRICE+trailingstop*pointsize //set the exit price at the MFE + trailing stop price level
endif
endif
//case LONG order
if longonmarket then
MAXPRICE = MAX(MAXPRICE,close) //saving the MFE of the current trade
if MAXPRICE–tradeprice(1)>=trailingstop*pointsize then //if the MFE is higher than the trailingstop then
priceexit = MAXPRICE–trailingstop*pointsize //set the exit price at the MFE – trailing stop price level
endif
endif
//exit on trailing stop price levels
if onmarket and priceexit>0 then
EXITSHORT AT priceexit STOP
SELL AT priceexit STOP
endif
//SET TARGET pPROFIT 46
SET STOP pLOSS 200
Hi Juju333
I have been running this version live on 1min TF since 16 december and so far 6 winning trades, 0 losing trades. Can someone run it on 200 K
>> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! << 🙂
Hello @jmf125,
It’s no possible backtest 200 k with TF 1 min… i don’t understand…
Hello @jmf125,
It’s no possible backtest 200 k with TF 1 min… i don’t understand…
Apologies this is on a 30 mins EUR/CAD
Hello @jmf125,
It’s no possible backtest 200 k with TF 1 min… i don’t understand…
Yes it is, but obviously the tested period will be shorter than 5 min, 15 min or 1h
@jmf125 : EUR/CAD M30, 200k, spread 2.5
Thanks EricN78
Not as good, 2013 seems to be the year giving the negative results. DD is also much bigger.
Hey guys,
I’ve started working on the code, but i still can’t figure out this part:
Newhighest=max(DHigh(0), DHigh(1))
Newlowest=min(DLow(0), DLow(1))
avghl = (Newhighest+Newlowest)/2
c1 = average[period2,period3]((Newhighest+avghl)/2)
c2 = average[period2,period3]((Newlowest+avghl)/2)
NewHighest is a single value, but later used to draw a moving average. Usually we use a “close” or at least an array, im confused about the type of this variable. Can someone help me clarify this ? 🙂
Hi Bobflynn
You can average any single value. As you correctly say the usual moving average will be on close; but you can also average any other value e.g open , low, high … or average a calculated value like newhighest
Check this out – by splitting into 2 strategies for long and short then re-optimizing each individually gives an extra 60% gain with combined win rate of 97% (4 losses out of 122).
More trades, more wins, lower drawdown, better best trade, better average gain, better gain/loss.
Left hand image is the combined strategy, based on Paul’s EURCAD-DhighDlow-v1p position size =1
Check this out – by splitting into 2 strategies for long and short then re-optimizing each individually gives an extra 60% gain with combined win rate of 97% (4 losses out of 122).
More trades, more wins, lower drawdown, better best trade, better average gain, better gain/loss.
Left hand image is the combined strategy, based on Paul’s EURCAD-DhighDlow-v1p position size =1
This looks awesome !! Thank you