// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
indicator1 = Williams[3](close)
c1 = (indicator1 < -90)
IF c1 THEN
BUY 100 SHARES AT MARKET
ENDIF
// Conditions to exit long positions
indicator2 = Williams[3](close)
c2 = (indicator2 > -69)
IF c2 THEN
SELL AT MARKET
ENDIF
https://www.youtube.com/channel/UCdYlcMOUVnm1iOFlg0_1udQ?disable_polymer=true
Hi Bubo, thanks for sharing this code with us.
I did test myself on a CFD contract (which are the only instruments possible for automatic trading through prorealtime) and I got almost the same results. However, I’d like to know how you did you defined the Williams percent levels?
I also did some comparison with buy and hold and it outperforms the strategy, are you aware of this?
Anyway, thanks again!
Hi Nicolas, how do you insert the price line on the backtest please ? Cannot figure out that trick.
Thank you.
Awesome.
That will be from now on a new “Strategy criteria of quality”.
Thank you again Nicolas for your help.
FYI: The picture attached shows the comparison only but the strategy is NOT the one mentioned on this post.
FYI2: It is a customised version of the 1 minute strategy from JunaJ.
@Inierta
which code did you use in the attachment of post #50591 ?
Thanks?
oh, sorry. I meant @Inertia 🙂
Buy and hold comparison is much more a way to compare with pure and simple investment in a share or index in daily timeframe than with speculation 1 minute strategy.