Login Page - Create Account

Support Board


Date/Time: Sun, 26 Jun 2022 23:55:37 +0000



[User Discussion] - auto study placing one trade

View Count: 993

[2014-01-07 21:42:46]
fhvtrading2 - Posts: 11
Hi,

I would like to implement a study that will place one auto order when turned on. I am not sure what the best approach would be to make it stop repeating new trades when the first one is finished so I can activate it and leave it alone. Basically I am looking for a simple way to disable a study after x number of trades.

Hope someone has some pointers.

Kind regards,

Ferry


[2014-01-08 00:41:02]
tomgilb - Posts: 3325
You can do this with the Spreadsheet System for Trading study.

You could reference cell J52 within a formula in cell J28.
[2014-01-08 02:22:49]
fhvtrading2 - Posts: 11
I am looking for acsil based solution. Can it be done with ACS buttons?
[2014-01-08 16:51:51]
Sierra Chart Engineering - Posts: 103469
For help with the Advanced Custom Study ToolBar buttons, refer to this page:
https://www.sierrachart.com/index.php?l=doc/doc_MouseAndMenuInteractionFromACStudy.html
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
[2014-01-09 02:12:03]
fhvtrading2 - Posts: 11
I have the following code snippet where I try to enable a study based on pushing the ACS button. But it doesn't seem to work. Can this be done?

Thanks in advance for any pointers.



SCInputRef Enabled = sc.Input[0];


// wait for an event
  if (sc.MenuEventID != 0)
  {
    if (sc.MenuEventID == SC_ACS_TOOL1)
    {
     Enabled.SetYesNo(1);
    }
  }
  else
  {
    Enabled.SetYesNo(0);
  }

  if (!Enabled.GetYesNo())
    return;

/// the rest of my study

[2014-01-10 02:05:22]
fhvtrading2 - Posts: 11
Figured it out how to do this. Its a nice feature to toggle between strategies. Hope somebody can use it as well.

Goodluck.

FHV



if (sc.MenuEventID != 0)
  {
    if (sc.MenuEventID == SC_ACS_TOOL1)
    {
      if (sc.MouseEventType == SC_ACS_TOOL_ON)
      {
        Enabled.SetYesNo(1);
      }
      else if (sc.MouseEventType == SC_ACS_TOOL_OFF)
      {
        Enabled.SetYesNo(0);
      }
    }
  }  

  if (!Enabled.GetYesNo())
return;

// rest of the study

// place an order with brackets when completed
//....
// acs button to off
  sc.SetACSToolEnable(SC_ACS_TOOL1, false);
  Enabled.SetYesNo(0);

Date Time Of Last Edit: 2014-01-10 02:07:41

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

Login

Login Page - Create Account