Add range breakout guard for reverse limit orders

This commit is contained in:
Hiroaki86
2026-06-13 11:27:10 +09:00
parent 2532d416fa
commit 4de3d24dcd
5 changed files with 414 additions and 2 deletions
+13
View File
@@ -453,6 +453,13 @@ int TrySendSplitEntryOrders(const int orderType, EAState &state, TickContext &ct
{
string entry_type = EntryTypeName(orderType);
double cur_price = CurrentPriceForOrderType(orderType, ctx);
string guard_reason = "";
if(IsLimitOrderBlockedByRangeBreakoutGuard(orderType, guard_reason))
{
Print("[Split Skip] ", entry_type, " blocked by range breakout guard. ", guard_reason);
return 0;
}
double zone_low = state.zone_low[orderType];
double zone_high = state.zone_high[orderType];
double tp = state.zone_tp[orderType];
@@ -551,6 +558,12 @@ bool TrySendEntryOrder(const int orderType, EAState &state, TickContext &ctx)
{
string entry_type = EntryTypeName(orderType);
double cur_price = CurrentPriceForOrderType(orderType, ctx);
string guard_reason = "";
if(IsLimitOrderBlockedByRangeBreakoutGuard(orderType, guard_reason))
{
Print("[Skip] ", entry_type, " blocked by range breakout guard. ", guard_reason);
return false;
}
double en = state.en_price[orderType];
double tp = state.tp_price[orderType];