Rule to choose the lowest price stock
Author: gonzo1
Creation Date: 6/6/2016 11:58 PM
profile picture

gonzo1

#1
Is there a command in the wizard that will allow me to specify that if I get multiple buy signals for my long only system it always picks the cheapest stock?
If there is not a command in the wizard how do I write that line of code?
thanks . Peter
profile picture

Eugene

#2
Of course positions can be prioritized but you can not assign a Priority without coding. That's because rule-based Strategies only support an entry or a pre-entry/exit condition and assigning Priority is a post-trade condition.

Fortunately, it's trivial to add such condition to any rule system after converting it to code or after opening in a new Strategy window:
CODE:
Please log in to see this code.

But since there's no way back this addition should be the last after having designed your system in the Rule Builder.
profile picture

gonzo1

#3
Thanks for the help.
I understand its perhaps an unusual command, yes i have developed a robust system without the cheapest stock command, just wanted to add it in and test it,

cheers

Peter
profile picture

Eugene

#4
Additionally, assigning a Priority will prevent from getting randomized backtests when capital is insufficient:

FAQ > Every time I run a Strategy I get a different result. What am I missing?
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).