Login Page - Create Account

Support Board


Date/Time: Sat, 27 Jul 2024 04:59:20 +0000



Automically moving an OCO limit order

View Count: 280

[2024-02-11 04:59:19]
User8135477 - Posts: 110
There are lots of posts discussing the function to automatically move an attached stop order to BE or trail once the price reaches a ceratin point.

On the contrary, are there any functions/programs to be able to automatically move an limit order to a predetermined price, if the current price reaches a certain point?

For example:

Long Order entry @ $100
OCO Sell Limit @ $200
OCO Sell Stop @ $50

If the price hits $75, move existing OCO Sell Limit to $110. However, as long as the price stays above $50, keep the existing OCO Sell Limit @ $200.

Please note that this is different than what would be accomplished with a Triggered Stop-Limit, since I need to maintain the existing Sell Stop @ $50 in the example above, regardless of whether the price reached $75 or not.
[2024-02-12 16:13:52]
John - SC Support - Posts: 33316
You could use the "Trade Management by Study" study to do this. Refer to the following:
Attached Orders: Study Controlled Targets and Stops

We would recommend using the "Spreadsheet Formula" for the referenced study, where you would use a formula like the following:
=IF(C > 75, 110, 200)

This states that if the Close is greater than 75, then use a value of 110, else use a value of 200.

Although the "Spreadsheet Formula" has the name "Spreadsheet" in it, it uses the Alert Syntax. Refer to the following:
Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-02-12 23:38:17]
User8135477 - Posts: 110
Can you please clarify the following:

1. What do I specify under the option: Controlling Subgraph Reference

2. Where do I enter the "Spreadsheet Formula"?

3. Rather than going off the Close of the price, is it possible to specify the point of the price at any given time going forwards? If not, would you suggest that the only way to get it as accurate as possible would be to use very short interval candlesticks (like 1 min, or even less)?

4. If I want to use a value of 200 as long as the price stays above 75, but use a value of $110 if it drops below $75, would this be the correct formula:
=IF(C > 75, 200, 110).

5. And lastly to confirm, would using the formula above still leave the attached Sell Stop @ $50 regardless of the outcome?
[2024-02-13 17:02:09]
John - SC Support - Posts: 33316
1. The "Controlling Subgraph Reference" is the "Spreadsheet Formula" study.

2. The "Spreadsheet Formula" is a study with the first Input being "Formula". You enter the formula there.

3. The Close is the last price. It has dual meanings in Sierra Chart. One meaning is the actual Close of a bar, but since the current bar is always changing, the "close" of that bar is also the "Last" price.

4. Yes, that formula does what you want.

5. Yes, this will not affect the stop. In the "Trade Management by Study" study, you define if you want to move the Target or the Stop. In this case, you would specify the Target.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-02-19 02:33:15]
User8135477 - Posts: 110
Will this still work if I "Hide" the Spreadsheet Formula Study?
[2024-02-19 02:50:15]
Sierra_Chart Engineering - Posts: 15584
Even if a study is hidden it is still calculated.
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-02-24 07:48:47]
User8135477 - Posts: 110
I tried this in Sim mode and it did not work. Please clarify:

1. Is this supposed to work in Sim? If so, please help troubleshoot. I've followed all the instructions previously provided. Or,

2. Is this only supposed to work with Live trading? If so, please confirm if this would work when trading with an external service (Interactive Brokers).
[2024-02-26 16:17:13]
John - SC Support - Posts: 33316
These functions work in Simulation Mode.

You need to take things one step at a time. Make sure your Spreadsheet Formula study is correct and that you have the line at the level you are expecting.

Then look at your Trade Management by Study to make sure it is setup correctly to follow the Spreadsheet Formula.

If you are getting an error, then we would need to know what it states. But in general, this should work fine.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-02-28 23:01:43]
User8135477 - Posts: 110
Make sure your Spreadsheet Formula study is correct and that you have the line at the level you are expecting

I've followed the instructions, and I see that the line is at the proper level. Can you please look through the screenshots and let me know what I am missing? As you can see from the chart, the attached order did not adjust and exit the position when it was supposed to (ie. when the price crosses the green line.
Private File
Private File
Private File
[2024-02-29 15:51:43]
John - SC Support - Posts: 33316
You need to follow where the Target is located at the time that the price moves across the green line, not just the green line itself. You have the "Order Adjustment Timing" for the "Trade Management by Study" set to "On Bar Close", so the price could move below 78.7 and then back up to 78.7 and your target would not have adjusted due to the bar not closing yet.
For the most reliable, advanced, and zero cost futures order routing, use 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