Hi Eric!
Here is a fix for the donchianstop module.
//-------------------------------------------------------------------------------------------
// -- Donchian Stop Logic -------------------------------------------------------------------
//-------------------------------------------------------------------------------------------
dcLo = lowest[donchianChPeriod](low)
dcLastStoplong = dcLo[1]
dcHi = highest[donchianChPeriod](high)
dcLastStopshort = dcHi[1]
if useDonchianStop and onMarket then
if longOnMarket then
sell at dcLastStoplong stop
elsif shortOnMarket then
exitshort at dcLastStopshort stop
endif
endif
//graph dcLastStop
//-------------------------------------------------------------------------------------------
Have you made it work on short side to?
Regards
Henrik
EricParticipant
Master
Hi Henrik
Thanks for fixing the code
No i haven’t been able to get the short side working and profitable
EricParticipant
Master
When changing this
//sellshort positionSize contracts at market
to this you can go short but long only is better (maybe in the next bearmarket?)
sellshort positionSize contracts at market
EricParticipant
Master
i have tested bitcoin on demo for 3 weeks now and the spread cost some but profit so far
its better result on demo than a backtest with 20 points spread
as i said its for fun, the risk is to high for me to put real money on it
(had some issue on a sunday but no problem else)
EricParticipant
Master
bitcoin
14 trades 12 winners and 2 losers
profit 2629 (buy and hold 3215)