Login Page - Create Account

Support Board


Date/Time: Tue, 26 Aug 2025 10:27:50 +0000



How do I auto-update a take profit level to remain at a fixed amount from average e price?

View Count: 627

[2023-05-05 17:34:53]
Ifrit - Posts: 51
Imagine the following scenario:

I'm long 1 contract
Take profit is set at 10 points
Market retraces and hits a buy limit order, increasing the position size to 2 contracts net
New average entry price is updated (lower than the first)

I want to have my take profit remain at 10 points from my average entry point, instead of remaining where it was initially set.

Example:
Buy 1 contract @ 13000: Take profit 13010
Buy 1 contract @ 12990: Average entry price = 12995. Take profit should auto-update to 13005.

Currently Take profit is still at 13010.

I can't find anything in the forums.
Date Time Of Last Edit: 2023-05-05 17:37:43
[2023-05-06 04:29:16]
Sawtooth - Posts: 4261
How do I auto-update a take profit level to remain at a fixed amount from average e price?
Move the Target with the Trade Management by Study study
that references the Spreadsheet Formula study's formula output
that references the Trading: Position Average Price study, and the
Trading: Position Quantity study.

Use a formula like this in the Spreadsheet Formula study's Formula field:
=IF(AND(ID3.SG1<>0,ID4.SG1>0),ID3.SG1+10,IF(AND(ID3.SG1<>0,ID4.SG1<0),ID3.SG1-10,0))
where ID3 is the Trading: Position Average Price study, and ID4 is the Trading: Position Quantity study.
Date Time Of Last Edit: 2023-05-06 04:30:13
[2023-05-06 12:45:52]
Ifrit - Posts: 51
Thank you.
[2025-07-06 21:20:42]
xeno - Posts: 1
Posting here because I have the same issue and can't seem to get it working no matter what I try. I've been trying to do what Sawtooth mentioned but everytime I try to open a position my position gets closed instantly. Any help for a newbie?
Thanks in advance!
[2025-07-07 17:23:00]
John - SC Support - Posts: 41464
Start by not using the Trade Management by Study and see if you continue to have the same issue with the trade being closed right away. If so, then there is something else occurring that you need to figure out.
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