We are all multimillionaires…
Try this : I just added my famous exponential growth routine.
Starting capital on 01.08.2010 is € 1000, and we start trading with only 1 initial DAX mini contract. The system reinvests profits and grows in position size until a maximum number of 1000 DAX mini contracts is reached.
Defparam cumulateorders = false
//exponential growth of position size - reinvestment of profit
cp = countofposition
pp = positionperf
pprice = positionprice
SP = strategyprofit
number = 1 + ((SP + pp * pprice * ABS(cp)) / 250)
n = round(number)
If n <= 1 then
n = 1
endif
If n > 1000 then
n = 1000
endif
possize = n
//////////////////////////////////////////////////////////////
//Andrew Abraham Trend Trader
//Posted by @Nicolas in PRC Library
/////////////////////////////////////////////////////////////
Length = 21
Multiplier = 3
avrTR = weightedaverage[Length](AverageTrueRange[1](close))
highestC = highest[Length](high)
lowestC = lowest[Length](low)
hiLimit = highestC[1]-(avrTR[1]*Multiplier)
lolimit = lowestC[1]+(avrTR[1]*Multiplier)
if(close > hiLimit AND close > loLimit) THEN
ret = hiLimit
ELSIF (close < loLimit AND close < hiLimit) THEN
ret = loLimit
ELSE
ret = ret[1]
ENDIF
/////////////////////////////////////////////////////////////
//Simplified supertrend (without volatility component ATR)
//Posted by @verdi55 in PRC Library
/////////////////////////////////////////////////////////////
ONCE direction = 1
ONCE STlongold = 0
ONCE STshortold = 1000000000000
factor = 0.005
indicator1 = medianprice
indicator3 = close
indicator2 = indicator3 * factor
STlong = indicator1 - indicator2
STshort = indicator1 + indicator2
If direction = 1 and STlong < STlongold then
STlong = STlongold
endif
If direction = -1 and STshort > STshortold then
STshort = STshortold
endif
If direction = 1 and indicator3 < STlong then
direction = -1
endif
If direction = -1 and indicator3 > STshort then
direction = 1
endif
STlongold = STlong
STshortold = STshort
If direction = 1 then
ST = STlong
else
ST = STshort
endif
/////////////////////////////////////////////////////////////
//PRC_adaptive SuperTrend (r-square method) | indicator
//Posted by @Nicolas in PRC Library
/////////////////////////////////////////////////////////////
Period = 10
mult = 2
Data = customclose
SumX = 0
SumXX = 0
SumXY = 0
SumYY = 0
SumY = 0
if barindex>Period then
// adaptive r-squared periods
for k=0 to period-1 do
tprice = Data[k]
SumX = SumX+(k+1)
SumXX = SumXX+((k+1)*(k+1))
SumXY = SumXY+((k+1)*tprice)
SumYY = SumYY+(tprice*tprice)
SumY = SumY+tprice
next
Q1 = SumXY - SumX*SumY/period
Q2 = SumXX - SumX*SumX/period
Q3 = SumYY - SumY*SumY/period
iRsq=((Q1*Q1)/(Q2*Q3))
avg = supertrend[mult,round(Period+Period*(iRsq-0.25))]
EndIf
//////////////////////////////////////////////////////////////////
OriginalST = Supertrend[3,5]
/////////////////////////////////////////////////////////////////
margin = 7*pointsize
If countofposition = 0 and abs(ret[1]-ST[1]) > margin and abs(ret-ST) > margin Then
If close > ret and close > ST and close > avg Then
Buy possize contract at market
ElsIf close < ret and close < ST and close < avg Then
Sellshort possize contract at market
EndIf
ElsIf longonmarket and ((abs(ret[1]-ST[1]) < margin and abs(ret-ST) < margin) or ((close < ret and close < ST and close < avg and close < OriginalST) and (close[1] < ret[1] and close[1] < ST[1] and close[1] < avg[1] and close[1] < OriginalST[1]))) Then
Sell at market
ElsIf shortonmarket and ((abs(ret[1]-ST[1]) < margin and abs(ret-ST) < margin) or ((close > ret and close > ST and close > avg and close > OriginalST) and (close[1] < ret[1] and close[1] < ST[1] and close[1] > avg[1] and close[1] < OriginalST[1]))) Then
Exitshort at market
EndIf
SL = 20//15//20 // Initial SL
TP = 0//30
TSL = 1 // Use TSL?
TrailingDistance =5// 20//20//20 // Distance from close to TSL
TrailingStep =5// 20//20//3 // Pips locked at start of TSL
//************************************************************************
IF TSL = 1 THEN
//reset the stoploss value
IF NOT ONMARKET THEN
newSL = 0
CAND = 0
ENDIF
//manage long positions
IF LONGONMARKET THEN
//first move (breakeven)
IF newSL = 0 AND CLOSE - TRADEPRICE(1) >= TrailingDistance*PipSize THEN
newSL = TRADEPRICE(1) + TrailingStep*PipSize
ENDIF
//next moves
CAND = BarIndex - TradeIndex
IF newSL > 0 AND CLOSE[1] >= HIGHEST[CAND](CLOSE) THEN
newSL = CLOSE[1] - TrailingDistance*PipSize
ENDIF
ENDIF
//manage short positions
IF SHORTONMARKET THEN
//first move (breakeven)
IF newSL = 0 AND TRADEPRICE(1) - CLOSE[1] >= TrailingDistance*PipSize THEN
newSL = TRADEPRICE(1) - TrailingStep*PipSize
ENDIF
//next moves
CAND = BarIndex - TradeIndex
IF newSL > 0 AND CLOSE[1] <= LOWEST[CAND](CLOSE) THEN
newSL = CLOSE[1] + TrailingDistance*PipSize
ENDIF
ENDIF
//stop order to exit the positions
IF newSL > 0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
SET STOP pLOSS SL
set target pprofit tp
ENDIF
Now look at the result ! 40 Millions out of € 1000 within 8 years, constant growth, almost no drawdown. And all of this by simple combination of 4 different supertrends ! No parameter optimization required anymore, forever !
Lo se, he añadido también un sistema de reinversión pero mi pregunta es…es esto un juego para ver quién consigue el mejor backtest?? de que sirve el backtest si luego realmente no tiene nada que ver con las operaciones en real?..
Se supone que proreatime es una plataforma de pago y debería ser fiable.A mi no me interesa tener un gran backtest, me interesa un backtest modesto pero fiable 100 o 80%…Invertir hors de trabajo para nada la verdad que no es mi idea..
ProRealtime is a mechanical software that does what you tell it to do. Whether it is real or not, is your decision, and you need to check it.
Apologies @Juanan71 for me saying … logically the value TP = 0 is corrupting all the figures … I checked the top 3 profit makers (in the results) as I couldn’t believe there was 0 MAE (maximum adverse excursion). But the figures are correct, all 3 trades opened and took off and never looked back!!! See attached figures and one trade as an example.
I am going to set the Strat going live tomorrow, but only while I am sitting there watching it! 🙂 It be interesting to see how a trade develops!!! I’ll just stop the Strat if it starts losing … I do this all the time anyway on my own Strats! 🙂
I’ll let you know how I get on!!!
GraHal
Warning: Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced clients who have sufficient financial means to bear such risk. The articles, codes and content on this website only contain general information. They are not personal or investment advice nor a solicitation to buy or sell any financial instrument. Each investor must make their own judgement about the appropriateness of trading a financial instrument to their own financial, fiscal and legal situation.
Pero que código estas usando??
I will set Live the code from your post #60713 but with a SL of 55 (your SL value was set at 20).
I anticipate a trade will open then immediately close at a Take Profit of 0 + or – slippage … what else can it do with TP set at 0??
Juanan71 what in your opinion are the exit conditions in your code version?
SELL AT newSL STOP
EXITSHORT AT newSL STOP
do not sell at a difference from the positionprice, but at the exact price given by newSL.
Furthermore, when newSL = 0, these commands are not carried out, because of
IF newSL > 0 THEN
SELL AT newSL STOP
EXITSHORT AT newSL STOP
ENDIF
Guys, don’t let yourselves be fooled – there is no money printing machine. Something must be wrong with this system, but I’m too lazy to find out what.
Juanan71 easiest is to type in your native tongue then right click and select translate to english and then copy and paste the english into the comments box.
Oh you need to be using Chrome browser to follow above, but you can also use the Translate button at the top of each page.
There is a simple bug with tp.
tp is always 0 (check by graphing it).
So then the code says all the time :
set target pprofit 0
which, according to the manual, should switch off all target profit orders. However, it does not, and this is where all these fake 0 profit positions come from.
Just leave the
set target pprofit tp
command away (this should not change anything , but it does) , and all the nice profits are gone, too bad…
Does this seem right @nicolas ?
See attached … lower equity curve is with TP = 0 and top curve is with TP commented out. Weird or what??
//set target pprofit TP
LeoParticipant
Veteran
It isn’t very weird GraHal, thanks for testing it.
I am following this thread and working verdi55 suoertrend simplified.
I found a bit complex to use multiple supertrend of different kinds when we have simplified one done by our colleague.
vendri55 take it easy, once I use a in real money to reinvest the profit of my strategy poisoned for this idea and with 2 wrong trades it consume my profits.
…just tell us if you get millonaire though 😉
Irony is not for everyone. I’d better go to the TV format, then ?