Support Board
Date/Time: Sat, 17 May 2025 05:15:42 +0000
Post From: Disable Automated Trading After X Point Profit
[2024-05-13 14:39:29] |
emmanuel - Posts: 63 |
const double DailyProfitTarget = x;
bool EnableTrading = true; s_SCPositionData PositionData; if(sc.GetTradePosition(PositionData) != SCTRADING_ORDER_ERROR) { if(PositionData.DailyProfitLoss >= DailyProfitTarget) EnableTrading = false; } // Don't proceed beyond this point if the Daily profit loss is greater than daily target if(!EnableTrading) return; See Automated Trading From an Advanced Custom Study: [Type: double] DailyProfitLoss |