BardParticipant
Master
Hi, I was checking an old backtest that used to work fine but now it does zero trades when you pro backtest it on the Dow and the £/$, but I can’t think why? Any ideas? Cheers.
//Ehler's Univ Osc(2) Indices
// Definition of code parameters
DEFPARAM CumulateOrders = false // Cumulating positions deactivated
// Conditions to enter long positions
indicator1, ignored = CALL "Ehler's Univ Osc SuperSmoother"[B]
c1 = (indicator1 CROSSES OVER -0.8)
IF c1 THEN
BUY 10 PERPOINT AT MARKET
ENDIF
// Conditions to enter short positions
indicator2, ignored = CALL "Ehler's Univ Osc SuperSmoother"[B]
c2 = (indicator2 CROSSES UNDER 0.8)
IF c2 THEN
SELLSHORT 10 PERPOINT AT MARKET
ENDIF
// Stops and targets
//Set stop ptrailing 300
// yearly and monthly returns
once startcapital=100000 // initial capital amount
once yearstartcap=startcapital // set initial capital for 1st year
once mstartcap=startcapital // set initial capital for 1st month
if day<day[1] and month=1 then // new year
endcapital=startcapital+strategyprofit // ending capital for the year (previous year)
prof=endcapital-yearstartcap // profit for the year (previous year)
yearstartcap=endcapital // set starting capital for the new year
yearreturn=(prof/startcapital)*100 // yearly return as percentage (previous year)
endif
if day<day[1] and month>month[1] then // new month
mendcapital=startcapital+strategyprofit // ending capital for the month (previous month)
mprof=mendcapital-mstartcap // profit for the month (previous month)
mstartcap=mendcapital // set starting capital for the new month
mreturn=(mprof/startcapital)*100 // monthly return as percentage (previous month)
endif
graph 0 coloured(0,0,255) // graph zero line
graph yearreturn coloured(0,200,0) as "Yearly Return %" // graph yearly return (prev year)
graph mreturn coloured(154,0,154) as "Monthly Return %" // graph monthly return (prev month)
Hi Bard,
It could be that your Super Smoother overly smooths because I see no mutual exclusivity for your buy and sell which me go against each other and then net to 0.
But that undoubtedly won’t be your issue. This will :
On Sept 6 or so in 2025 IG blew up most of their data leaving us at PRT with mostly no data. More than a month of recovery on both PRT and IG sides of the matter brought most back but also much not.
Can that be it ?
The culprit is mostly in the point value of instruments. So you may need to investigate that. Also, this appeared to be personal (somehow !). So my value for the same instrument would be different than your value. These things already were so, as it seems (but we did not know), and in this context not all could be properly restored. So focus on that – if related at all to this Sep 2025 happening.
Regards,
Peter