Hi,
Is the platform going nuts? I ask it to QUIT; well it does and then not (see image) …
defparam cumulateorders = false
// Money Management
Capital = 1000 + strategyprofit
n = capital/close
timeframe (24 hours, updateonclose)
EntryMT = DOpen(0) <8.05 // Entry Master TimeFrame
timeframe (4 hours)
Period=20
inner = 2*weightedaverage[ round( Period/2 ) ](close)-weightedaverage[Period](close)
MMHULL=weightedaverage[ round( sqrt(Period) ) ]( inner )
TrailStop = MMHULL
timeframe (default)
// vente short
if EntryMT then
sellshort n shares at 7.95 stop
//first stoploss:
//exitshort at TrailStop stop
exitshort at 7.1 limit
//dynamicSL = TrailStop
endif
if shortonmarket[1] and not shortonmarket then
quit
endif
I can replicate the issue with your code. Even if the strategy has quit, the equity curve continue to evolve .. and there is no order at all on market!
Could you please send a technical report with a link to this thread? I’ll do the same.
Even without the TIMEFRAME instruction, I still get the same behavior, so it seems not related to MTF conditions.
I think that the problem come the test made with ONMARKET, because if you GRAPH:
graph shortonmarket[1] and not shortonmarket
you’ll see that this condition never happened (because the order is open and close in the same bar), but yet the strategy quit..
Problem found and should be fixed in an upcoming version.
FYI, this issue has been fixed and deployed in the current version.