Login Page - Create Account

Support Board


Date/Time: Mon, 16 Jun 2025 14:32:22 +0000



[User Discussion] - Advice on Implementing of a custom exit

View Count: 989

[2022-09-19 11:24:33]
User764761 - Posts: 9
Hello

I am looking to exit a trade based on an indicator, I want to know the recommended method to adopt e.g. code, spreadsheet or both?

What I want to do is as follows:

- Wait for an economic news and decide, based on that, to go long, short or no trade.
- Enter the trade about 60 seconds later with a fixed stop loss e.g. 20 ticks.
  - This stop loss is known in advance
  - I plan to enter this manually.
  - There is no take profit (see later) but we could enter 800 ticks is required.
- If Long, exit the trade when the Parabolic SAR (P-SAR) crosses over the price
  - Note: In cannot be when the P-SAR is above as it initially could be above.
- If Short, exit the trade when the Parabolic SAR (P-SAR) crosses under the price.
- The P-SAR should ideally be running the background and pick up and manage trades long or short as appropriate.
  - It could be initiated with the trade somehow e.g. if you can have trailing stop based on an indicator. But please note, this is not straight forward as the exit is the crossover not comparing levels.

Other points to make it easier
- I will only be dealing with one instrument either MGC or GC.
- I will NOT have any other positions open
- The SL is fixed and known well before the trade
- The number of contracts is fixed and known well before the trade
- I'm happy to have any particular pragmatic solution either fully automated or partially but is has to be feasible to be achieved in about 60 seconds.


Ideas I have thought of:
- Attach an indicator to a SL?
- Code using the spreadsheet?
- Code using SierraCharts C++ language

If I have submitted this in the wrong place please advise and I will resubmit (apologies in advance)/
[2022-09-19 16:41:45]
Sawtooth - Posts: 4227
This can be done using the Spreadsheet System for Trading study, and using Attached Orders.
You would only use the Buy Exit and Sell Exit columns, with formulas only in cells L3/N3.

See post#7 for an example of how to isolate the PSAR flip:
Color Background Based on Alert Condition and the Parabolic SAR (PSAR)
This example is using Alert syntax; you'd need to convert to spreadsheet syntax.
[2022-09-19 16:42:08]
Sawtooth - Posts: 4227
This can be done using the Spreadsheet System for Trading study, and using Attached Orders.
You would only use the Buy Exit and Sell Exit columns, with formulas only in cells L3/N3.

See post#7 for an example of how to isolate the PSAR flip:
Color Background Based on Alert Condition and the Parabolic SAR (PSAR)
This example is using Alert syntax; you'd need to convert to spreadsheet syntax.

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

Login

Login Page - Create Account