Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 21:52:50 +0000



Post From: Stoploss rejected in ACSIL auto trading system

[2020-08-01 21:26:10]
User820318 - Posts: 40
Thanks very much.

Something like the below?

// Flatten if position open with no working orders
s_SCTradeOrder ExistingStopOrder;
int OrderResult = sc.GetNearestStopOrder(ExistingStopOrder);

if (PositionData.PositionQuantity != 0 &&
!OrderResult)
{
sc.FlattenPosition();
sc.AddMessageToLog("Position exists with no stop. Position was Flattened.", 1);
}