Is there any property or method in NinjaScript that my strategy can use to keep me from placing any more trades for the rest of the day?
Ive found several examples of trade limiters and stuff. But thing is, I dont want my strategy to place trades, I only want it to 'disable' the ability of placing trades, so to speak. For instance:
*Rule 1 = 2 losing trades per day (150usd each)
*Rule 2 = 1 winning trade per day
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
int dailyLoss = 300
int dailyTarget = 175
if (RealizedPnL || UnrealizedPnL == dailyLoss || dailyTarget)
{
//some expression to prevent the trader from taking any more trades for the day
// something that when the trader clicks buy or sell, the order gets rejected by the strategy
// as if the buy and sell buttons get disabled
ExitLong();
ExitShort();
}
*The only way for the trader to place more trades in the same day is to disable the strategy on the respective chart.
Thanks in advance.
Comment