Login Page - Create Account

Support Board


Date/Time: Sun, 19 Jan 2025 06:14:58 +0000



Capture"Auto Trading Enabled-Chart" status

View Count: 1191

[2018-03-13 14:40:34]
User701453 - Posts: 176
Is there a way to capture the "Auto Trading Enabled-Chart" status value.
I need to be able to capture the On/Off value so I can display it on the chart itself.

I have a chart book containing 5 different markets and I need to know at a glance which chart has "Auto Trading Enabled-Chart" mode enabled.

I would like to display the value in a Text Display study.
[2018-03-14 01:22:59]
User701453 - Posts: 176
Since there appears to be no current way to capture the chart enabled status with current studies.
I writing my own DLL.

The dll compiles without any errors but Im only getting 0.00 from sc.ChartTradeModeEnabled.
Even when I have the "Auto Enabled - Chart" checked.

I need to know the type and format of value returned from sc.ChartTradeModeEnabled.
I`m currently using DRAWSTYLE_TEXT.
[2018-03-14 03:18:36]
User553714 - Posts: 184
Is this what you're looking for?
ACSIL Interface Members - Variables and Arrays: sc.IsAutoTradingEnabled
[2018-03-14 05:28:04]
User701453 - Posts: 176
Yes,Thanks.

That link helped me to locate the sc function for the "Auto Enabled - Global" option I was going to look for next.

Currently, This is the block of code that I am using to determine Auto trade Status.
However, it only returns 0.00 for each option.

Even when I have both Auto Trade options checked under the Trade tool bar.


if (sc.IsAutoTradingEnabled)
     {
      //GlobalTradeEnabled[sc.Index] = "Enabled";//make it more logical
      GlobalTradeEnabled[sc.Index] = sc.IsAutoTradingEnabled;
     }
      else
       {
        //GlobalTradeEnabled[sc.Index] = "Disabled";//make it more logical
        GlobalTradeEnabled[sc.Index] = sc.IsAutoTradingEnabled;
       }

    
    if (sc.ChartTradeModeEnabled)
     {
      //ChartTradeEnabled[sc.Index]= "Enabled";//make it more logical
      ChartTradeEnabled[sc.Index]= sc.ChartTradeModeEnabled;
     }
      else
       {
        //ChartTradeEnabled[sc.Index] = "Disabled";//make it more logical
        ChartTradeEnabled[sc.Index] = sc.ChartTradeModeEnabled;
       }

[2018-03-14 05:50:42]
User553714 - Posts: 184
As far as I can tell the function GlobalTradeEnabled does not exist.

If you are just trying to determine whether AutoTrading is on off then you just do something like

if (sc.IsAutoTradingEnabled == 1) --> AutoTrading is enabled
else
--- > AutoTrading is Not enabled


The correct function for determining Chart trading status is here
ACSIL Interface Members - Variables and Arrays: sc.ChartTradeModeEnabled
[2018-03-14 06:37:07]
User701453 - Posts: 176
Thanks for your input and help.
I`m using what may seem like a long code block, that could be made smaller.
But I plan to add additional code within the decision statements.
Such as write to message log, etc.


Yes, Perhaps Sierra needs to update their support page.

SC version 1705 allows you to choose To have a master switch "Auto Enabled - Global" for the entire Instance and then "Auto Trading Enabled-Chart" for each individual chart in the chart book.

I was able to get the sc.IsAutoTradingEnabled status working.

It returns a "1" now when it is enabled and a "0" when disabled.
But only if "Auto Trading Enabled-Chart" is also checked for the chosen chart.


The sc.IsChartTradeModeOn also finally returns a value of "1".

Bad part is that it stays a "1" even if the "Auto Trading Enabled-Chart" isn't checked.
So looks like there is a internal platform bug.

So long story is, I'm still not able to see at a glance when a chosen chart has "Auto Trading Enabled-Chart" checked.

Perhaps SC support will take time to view this thread and provide a workable solution for the
sc.IsChartTradeModeOn only returning a "1".

Current code block below:

if (sc.IsAutoTradingEnabled)
{
//GlobalTradeEnabled[sc.Index] = "Enabled";//make it more logical

GlobalTradeEnabled[sc.Index] = sc.IsAutoTradingEnabled;
}
else
{
//GlobalTradeEnabled[sc.Index] = "Disabled";//make it more logical

GlobalTradeEnabled[sc.Index] = sc.IsAutoTradingEnabled;
}


if (sc.IsChartTradeModeOn)
{
//ChartTradeEnabled[sc.Index]= "Enabled";//make it more logical

ChartTradeEnabled[sc.Index]= sc.IsChartTradeModeOn;
}
else
{
//ChartTradeEnabled[sc.Index] = "Disabled";//make it more logical

ChartTradeEnabled[sc.Index] = sc.IsChartTradeModeOn;
}

[2018-03-14 15:29:36]
User701453 - Posts: 176
Ok, did more digging and sc.IsChartTradeModeOn and sc.ChartTradeModeEnabled both relates to the ability to trade from the charts.
Unchecking those options, made sc.IsChartTradeModeOn go to "0"
So, neither one of those is what I need.

I need the sc function related to "Auto Trading Enabled-Chart".

Looks like Sierra Support is ignoring this support request and the post has been set to "User Discussion", which I did not do.
[2018-03-16 00:47:57]
Sierra Chart Engineering - Posts: 104368
We will add this.
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
[2018-03-19 00:51:49]
User701453 - Posts: 176
We will add this.

Any time frame on this addition??

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

Login

Login Page - Create Account