Login Page - Create Account

Support Board


Date/Time: Sat, 04 May 2024 00:08:16 +0000



Calculated Attached orders with Broker when using Spreadsheet System

View Count: 513

[2020-05-10 05:17:11]
FrankCTX - Posts: 8
Hello,

I have a Spreadsheet System for Trading that accurately places my entry for the correct quantity as intended. In summary, due to a spotty connection, I would also like to be able to place calculated stop and target orders as attached orders along with the entry order so that they would all be with the broker as a group. I do not want to use the Attached Orders feature of the Trade Window as this appears to be a fixed amount, and my desired stop and target prices are variable and based on a calculation at the time of entry order placement.

I know I can use L3 for a buy exit with something like "=OR(AND($J$8 > 0, ID0.SG4@$3 <= $J$9-1), AND($J$8 > 0, ID0.SG4@$3 >= $J$9+2))" but this creates a situation where I have a naked position reliant on my internet connection at the time the price reaches either the stop or target. I need all orders with the broker at the same time.

I also tried, setting L3 to =$J$8>0 and then using J23 to calculate the desired price. The two problems with this approach is again, I would really like the stop and target orders to be placed along WITH my entry order, and secondly, I using this method I can either place an order for the stop or the target, but not both.

Lastly, I thought maybe I could go ahead and use the Attached Orders feature of the Trade Window at arbitrary prices, then use the Trade Management by Study study to immediately move the target and stop to the desired locations based on my calculations at the time the entry order is filled. Not perfectly ideal since the desired target and stop would not be in the correct location when the entry order triggers, but might be something I can work with. I still can't figure out how to make it work though as the Trade Management by Study study needs to reference another study. Is there a way I can have a study automatically draw horizontal lines at the location of my desired stop and targets at the time my entry order is triggered, and in a way that they don't move with time so my stop and target as managed by the Trade Management by Study will be constant?

I'm trying to avoid an Advanced Custom Study if at all possible.

Any thoughts are much appreciated.

Thank you!
[2020-05-10 13:12:38]
Sawtooth - Posts: 3993
Using the Trade Management by Study study is the preferred option, IMO.
It just needs to reference a spreadsheet Formula Column/subgraph, not another study.
Use a formula that has a persistent value for the duration of the trade.

Use a separate instance for the Target and Stop.
Set the Order Adjustment Timing to Every N Seconds.
Set the Adjustment Frequency to 1 second.
Set the Trailing Offset to 0.

You can set the initial Attached Orders offsets in J80/J81. (These offsets are in points, not ticks.)
[2020-05-10 21:35:42]
FrankCTX - Posts: 8
Thank you, @tomgilb! That makes sense...eager to give it a shot this evening!

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

Login

Login Page - Create Account