Login Page - Create Account

Support Board


Date/Time: Sun, 08 Sep 2024 04:58:44 +0000



Exit on the Bar Close - Trading System Based on Alert Condition

View Count: 142

[2024-07-05 13:06:48]
User695264 - Posts: 15
Dear Sierra Chart Team,
I am designing a Trading System based on Alert Condition. I enter a trade when the Current Price retrace to a level, and then I need to exit at the Bar close - scalping. How does SC system differentiate between the Current Price (expressed as C) and the Bar Close also expressed as C? Will it take me out of my trade immediately after entering if I put =C as my exit Alert? Of course, I can go around and use the remaining Time/Volume/Delta number at the Countdown Timer being below 2, for example, but it seems excessive. Would you please clarify? Many thanks in advance! Best regards, Greg
[2024-07-05 16:01:30]
John - SC Support - Posts: 34254
We are not exactly sure how you are setting this up, but in order to get an Alert when a bar is closed, you would enter the following for the Alert Condition:
=1

So the alert is always active, and then enable the alert option for "Evaluate on Bar Close".

--

It sounds like you would need a condition to test if you are in a trade. Again, without knowing more about what you are doing, all we can recommend is to use the "Trading: Position Quantity" study and test against this to see if it is non-zero (hence you are in a trade). In which case your alert condition would be the following:
=ID1.SG1 > 0

Again, make sure the option for "Evaluate on Bar Close" is enabled, so you will then close out any open positions on bar close when you are in a trade.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-07-05 16:48:58]
User695264 - Posts: 15
Hi John, thank you for replying so quickly! I use four Trading System Based on Alert Condition: one - for Entry Buy, one - for Entry Sell, one - for Exit Buy, and one - for Exit Sell. Entries have setup conditions - I do not expect problems with them. The intent is to get out of the trade at the end of the same bar where I entered - basically, I anticipate that under my condition the bar would close higher (or lower), so I need to exit at the bar close after entering.

Evaluating true condition (=1) at the Bar Close is simply brilliant - thank you! Let me test and, if this does not work, I will be back. Best regards, Greg
[2024-07-06 15:34:07]
User695264 - Posts: 15
Hi John, tried to test this exit recommendation, but the system skipped the bar close once (out of two trades - 50%), and with a new bar I was still in the market - simulation mode though. Are these occurrences supposed to be expected? Under what conditions? Alternatively, can I use the countdown timer at 1 second to exit the bar? One second cannot be jumped over comparing to Volume and Delta based charts. How one second condition would look like - e.g., ID12.SG1=00:00:01? If you believe that this method of automated trading is sub-optimal, and I need to switch to spreadsheet-based trading, feel free to recommend. Many thanks for your reply! BR, Greg
Date Time Of Last Edit: 2024-07-06 15:36:13

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

Login

Login Page - Create Account