Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 03:25:08 +0000



Trading System Based on Alert Condition

View Count: 347

[2024-04-01 17:46:40]
User9415867 - Posts: 38
I began looking at the study ' Trading System Based On Alert Condition' . I watched the video on setting that up and it might be what I need here. I was wondering about a few settings and code for the ALERT input.

1. I used the study High/Low for Time Period
2. I want to put on a sell market order when there is a close over the low of the lower line of the 'High/Low Time period' study or a long with a close over the high line of the 'High/Low Time period'
3. I want it to only happen 1x when it crosses with a close and then it no longer is enabled and then the alert is off until I enable it again.
4. I want to place a STOP over the high or low of the bar that triggered the entry.

What would those settings look like to do this and what would the code in the ALERT tab look like?
[2024-04-01 17:55:47]
John - SC Support - Posts: 36238
2. Since you want to have a Buy and Sell condition, you would need to have two copies of the "Trading System Based on Alert Condition" study, one for Buy and one for Sell.

For the Sell situation, you would put the following Alert Condition in the Alert tab for the "Trading System Based on Alert Condition":
=C < ID1.SG2

Where C is the Close of the bar, ID1 is the ID of the "High/Low for Time Period" study and SG2 is Subgraph 2 of the High/Low for Time Period study, which is the Low.

As long as the Input for "Support Reversals" is set to "No", then you will not have any issue with the two studies conflicting.

3. To do this just make sure the Inputs for "Maximum Long Trades Per Day" and "Maximum Short Trades Per Day" are set to 1. You would have to increase this to then get another trade to occur.

4. Generally to place a Stop, you would have it setup in the Trade Window with a certain offset. To get what you are asking for here, you would need to use the "Trade Management by Study" study and set it up to have the Stop moved to the High/Low of the Main Price Graph and then you would have to turn it off so that it does not update with further bars. Refer to the following:
Attached Orders: Study Controlled Targets and Stops
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