Login Page - Create Account

Support Board


Date/Time: Thu, 02 Apr 2020 00:19:46 +0000



[User Discussion] - auto study placing one trade

[2014-01-07 21:42:46]
fhvtrading2 - Posts: 11 | Ending Date: 2014-08-01 [Expired]
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: 2429 | Ending Date: 2020-04-30
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 | Ending Date: 2014-08-01 [Expired]
I am looking for acsil based solution. Can it be done with ACS buttons?
[2014-01-08 16:51:51]
Sierra Chart Engineering - Posts: 82993 | Ending Date: 2020-06-09
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. If possible please keep your questions brief and to the point. Please be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

If your question/request has been answered and you do not have anything further, then it is easiest for us if you do not reply again to say thank you.
[2014-01-09 02:12:03]
fhvtrading2 - Posts: 11 | Ending Date: 2014-08-01 [Expired]
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 | Ending Date: 2014-08-01 [Expired]
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 login with your Sierra Chart account:

Login

Login Page - Create Account