ie... a long strategy is failing because markets are selling off aggressively, and every dip buy fails. As the strategy fails perhaps twice or three times in a row, make subsequent entries have less size.
Any way to do this?
I see this is a cumprofit variable that I could use, but that won't be very effective if I had one home run in the beginning of the day, and three smaller failures after.
Basically, I'd like to build damage control into the strategy.
[ie lets say my strategy is countertrending, and the day is overall a trending day...]
Also: I've noticed the BarsSinceEntry() and BarsSinceExit() values do not work on the basis of a less than qualifier ie if the running strategy has not yet initiated a position, since by default Barssinceexit = -1 and barssinceentry could equal 0:
if (BarsSinceEntry())
EnterLong();
My thoughts are I could use the BarsSinceExit or Entry statement as a way to exclude reattempting a failed trade within a certain timeframe. The problem is that if I put this qualifer in front of my main logic, I will never trigger an order, since by default they are less than 1 or 0 already. (i figure 10-20 3 min bars could be enough to exclude too soon re-entry).
Any way to make these variables have defaults of above 100 if the strategy had never been invoked?
Comment