Rule to temporarily suspend Screen/Strategy?

Is there a rule that makes it possible for a Screen to select 0 stocks based on the recent performance of the Screen itself. For example, if the screen performance was -10% for the last 5 days, this rule would results in 0 stocks being selected. Thanks.

In a portfolio or simulation add a buy rule such as:
portbars>5 & ( 100* (close(0,#Equity)-close(5,#Equity)) / close(5,#Equity) > -10 )
But this is not doable in a screen…

So #Equity refers to the sim/port that the rule is currently running within?

yes

Ok, understood. Thanks.

The formula portbars>5 & ( 100* (close(0,#Equity)-close(5,#Equity)) / close(5,#Equity) > -10 ) will only buy stocks after 5 days from inception, same as the formula without portbars.

You can overcome this with an eval statement such as this:
eval(portbars<15,1, 100*(close(0,#Equity)-close(15,#Equity))/close(15,#Equity)>-10)
(In this case I used a window of 15 bars.)

Also interestingly, this formula not only stops buying new stocks, but it also ignores the “Allow Immediate Buyback” “Yes” setting. This results in the majority of stocks being sold and in reducing max draw-downs by a lot. (You don’t need any other market timing rules.)

Also note, that if you use rebalancing with “Position Weight Formula” then you must also specify a max “Weight Constraints”, otherwise if you are left with only 1 position, that position will have a weight of 100, which will not reduce the draw-down by much.

Good to know, thank you. Would be great if this functionality was available in a Screen, but I’ll try the Simulation.