Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 12:33:52 +0000



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

View Count: 406

[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: 4120
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.

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

Login

Login Page - Create Account