How to make SQ sure to generate this type of strategy?
3 replies
eastpeace
4 years ago #254950
It is not using the exit rule. But the exit rules is always true.
I get this strategy occasionally, but I find it very interesting. I have always disliked the current exit rules because it is not logically consistent with the entry conditions.
So. how to set and make SQ sure to generate this type of strategy?
Mark Fric
4 years ago #255022
what exactly you want to do? generate strategies ehere exit rules are always true?
exit rules work, but if you’ll check Pseudo code Long exit has this condition:
//——————————————————————–
// Trading rule: Long exit (On Bar Open)
//——————————————————————–
if ((LongExitSignal
and Not LongEntrySignal)
and (MarketPosition(“Any”, MagicNumber, “”) is Long))
{
So it is activated only if there is a position AND there is no long entry signal.
Mark
StrategyQuant architect
eastpeace
4 years ago #255024
Yes, I want the exit condition is always true.
So the position will be closed when the entry condition is failed. ( ExitCondition and not (EntryCondition))
tomas262
4 years ago #255027
It seems it works fine meaning it exits a long position as soon as EntryCondition is FALSE. If its false next bar after entry it exits after 1 bar. In the trade list in SQ you can see the exit type “MANUAL” which stands for the exit rule
If you need more strategies like this you would need to create a template for this using AlgoWizard where you specify exit conditions the same way as it is with your strategy or you can use this one strategy and use “Improve existing strategy” function. This can create many new strategies just by altering entry rules and keeping the exit rule the same “always true”
Viewing 3 replies - 1 through 3 (of 3 total)