Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 09:35:16 +0000



[Programming Help] - Cannot get bracketed order setup with spreadsheet. Not sure if my thinking is right.

View Count: 866

[2019-06-23 08:08:39]
GageBrk - Posts: 3
Ok, so here's the trading logic for what I'm trying to do:

If Price Closes above Range High: enter BuyLimit @ Range High, StopLoss @ Range Low, Target @ 1.50 * RangeWidth.

I have all that logic setup in my spreadsheet, that's not the problem. The problem is when it comes time to place the SellLimit (target) and Stop. The way I'm thinking I have to do this (which isn't working), is set the Buy Limit (entry) after the break above with a Simple Bracket for the Stop Loss 'x' points away. I then try to use the "Trade Management by Study" to move the stop to the right place (at the range low)

I then have it where my 'Buy Exit(Sell)' looks for the position value in J5 to be 1, which then evaluates to True and triggers the 'Limit or Stop Price - Buy Exit (L)' value in J23 (which is supposed to set the calculated target limit).

Here's the problem: Breakout happens, the Buy Limit and Sell Stop are set. but once the Buy Limit gets filled, the Sell Stop disappears, and the Sell Limit (target) appears... I've been banging my head trying to figure this out, and I can't. I'm sure it's just a settings issue I'm having, but I'm not sure. I've looked through the documentation, I'm not really sure why this is happening. Any help would be greatly appreciated.
[2019-06-23 13:51:22]
Sawtooth - Posts: 3976
The easiest way to do this is to use Attached Orders, and set the target and stop offsets in J80/J81.
Leave L3/N3 blank.
You won't need to use the Trade Management by Study study.

K3/M3 are the entry triggers, the Limit prices are in J22/J24, and the order types are in J71/J73.

Since you are placing a Limit order at close of bar, reference row 4. Try this:
J22: =C4
J24: =D4
J71/J73 are set to 'L'.
J80: =(C4-D4)*1.5
J81: =C4-D4
Check 'Use Attached Orders' on Trade Window.

Note: J80/J81 offsets are in points, not ticks.
[2019-06-26 06:10:23]
GageBrk - Posts: 3
Thank you so much. I KNEW what I was doing was boneheaded, and there had to be a more straightforward way of doing it. Thank you!

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

Login

Login Page - Create Account