Login Page - Create Account

Support Board


Date/Time: Mon, 23 Dec 2024 19:00:03 +0000



ACSIL: disable autotrading once a DailyProfitLoss target is reached

View Count: 1044

[2015-10-05 21:47:40]
User44052 - Posts: 34
In an ACSIL auto-trading strategy, is it possible to programmatically disable auto-trading once a target DailyProfitLoss has been hit?

The support board has answers for doing this when using spreadsheet trading, but I can't find an equivalent for ACSIL.

I'm trying this but it doesn't seem to work.

  sc.MaintainTradeStatisticsAndTradesData = true;

  s_SCPositionData myPositionData;
  sc.GetTradePosition(myPositionData);

if ( myPositionData.DailyProfitLoss >= 10 )
{
break
}
[2015-10-06 18:01:19]
Sierra Chart Engineering - Posts: 104368
Do you mean you want to effectively uncheck the option Trade >> Auto Trading Enabled?

Otherwise, you would just simply do something like this:

if ( myPositionData.DailyProfitLoss >= 10 )
{
return;
}

Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2015-10-06 18:01:34
[2015-10-06 19:27:50]
User44052 - Posts: 34
Thanks, SC Engineering - it's sorted now.

The problem turned out to be how the number ("10" in this case) is interpreted for different feeds. For FDAX futures through Transact, 10 points is equivalent to just 1 point on GER30 through FXCM.

I probably need to re-interpret the number in terms of TickSize etc.
[2015-10-08 02:51:34]
Sierra Chart Engineering - Posts: 104368
DailyProfitLoss is a currency value as explained here:
https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#s_SCPositionData
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account