Support Board
Date/Time: Tue, 16 Dec 2025 22:37:02 +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 |
