@Philstrading
did you try dynamic ATR trailing stop ? and ADX ? on my original strategy
I think it would be a way to increase the profit . On my side, i’m currently working on it and results are better.
Regarding the values of the supertrend, it’s always difficult to find the best values and more complicated to use it during trading range period..
I did not, however trailing stops can vary results also reducing gains in some programs and conditions, as we only have 6 months data at the mo its probably best to run one that seems to work, I am runnning it live as it has good risk management and return if successful and will quit if it fails at my predefined loss, but you could run them live side by side and compare, with halving the entry on each, or putting one on a demo.
When putting up ideas its always useful to use the “insert PRT Code” box to insert the code you are talking about, it makes it easier to copy and check. Sometimes you also need some randomness, so for instance I have a cable program that improves with the longs set to a positive stop, and shorts to a reduced stop after 60 pips, making both positive stops decreases profits no matter how far you backtest it. So you can tweak something but if it does what it states on the tin then sometimes just go with whats working.
Slap up the code here I’ll backtest it to 6 or 7 months, try it alongside on the demo probably as well. 1 minute code only good for backtesting, I’ve found anything below 1 minute does not give reliable results when backtested and is for very limited periods which doesnt give a balanced view of how programs react across the market conditions over time.
You can use time codes to limit trading during expected slow periods, however can’t predict all conditions of course, that’s why we employ risk management.
Copy the code in and I’ll see how it looks on backtest…
“When putting up ideas its always useful to use the “insert PRT Code”…. I know that..
it was just a question. My work is on the way and the PRT code isn’t finished.
Same point of view, i no longer work on units smaller than M1..
New version
I’ll put it directly on production
i’ll come back as soon as results are good and i’ll provide the itf
What did you change then?
Trailing Stop / Dynamic ATR / Pivot management for the exit position
Look forward to the code then..
Is it possible to poste the itf-file?
So this is the monthly feedback of forward testing. Pretty much all others except the one minute not good at all, the code below for 1 minute ran on defailt of 1s doing well.
The original code below is doing the best, with 15 mins and 1 mins timeframes ran on a default timeframe of 1 second and generally its saoring above all the others with one month data exactly. I will post the results below which is £1 per pip £300 stoploss.. The live tested one has only partial data as was put up late after some modification so doesnt have a months data yet but remains positive.
//-------------------------------------------------------------------------
// Main code : Makside DJI S1
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Code principal : CANDLE
//-------------------------------------------------------------------------
Defparam cumulateorders = false
n =1
timeframe(15 minute,updateonclose)
c160m = open > open[1] and close > close[1] and close > open
timeframe(1 minute,updateonclose)
c11m = open > open[1] and close > close[1]
c21m = abs(close-open) >= 17
c31m = abs(close[1]-open[1])
c41m = c31m > c21m
timeframe(default)
c1def = open > open[1] and close > close[1]
c2def = abs(close-open) >= 1
IF not longonmarket and c1def and c11m and c21m and c41m and c2def and c1def and c160m then
BUY N contracts at market
set stop ploss 300
ENDIF
//if longonmarket and close crosses under st then
//sell at market
//endif
//************************************************************************
//trailing stop function
trailingstart = 19 //trailing will start @trailinstart points profit
trailingstep = 7 //trailing step to move the "stoploss"
//reset the stoploss value
IF NOT ONMARKET THEN
newSL=0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
newSL = tradeprice(1)+trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
newSL = newSL+trailingstep*pipsize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
newSL = tradeprice(1)-trailingstep*pipsize
ENDIF
//next moves
IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
newSL = newSL-trailingstep*pipsize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL>0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
Is there a short version?
not yet but you can do it
Another version on the way with candle, BB, MTF H1/M1
WFE>50% 70/30
I’ll come back with these strategies and it files as soon as results will be tangible
something new on the backtest of this version?