Support Board
Date/Time: Sat, 23 Nov 2024 02:36:37 +0000
Using Sequence of events in trading
View Count: 132
[2024-09-20 03:32:46] |
User130696 - Posts: 88 |
Hello, How can I trigger a buy order using Trading Alert if MACD Crossover signals Buy and few bars (how many bars? is unknown) after the price also crosses above ATR High Band Line as an example? Thanks |
[2024-09-20 14:12:50] |
John - SC Support - Posts: 36238 |
This is where computers are not better than humans. You need to have some limit on the number of bars forward you want to check for the pricing crossing the ATR High Band line. You can look at this and quickly decide if it is within the range you want or not, but to program this, you need to be specific. Actually, to do this, you need to program the opposite - you need to look at when the ATR High Band has been crossed and then look backwards to see if the MACD Crossover signal for a Buy had occurred within some number of bars. Your Alert condition would look like the following: =AND(C > ID1.SG1, OR(ID2.SG1[-1], ID2.SG1[-2], ID2.SG1[-3])) Where ID1 is the ID of the ATR study, [ID1.]SG1 is the High band from that study, ID2 is the MACD Crossover study, and [ID2.]SG1 is the buy subgraph from the MACD Crossover study. The [-1], [-2], and [-3] are offsets from the current bar, so the above checks the 3 bars behind the current bar to see if the MACD crossover signaled. You would need to add additional items to that area to go further back. For the most reliable, advanced, and zero cost futures order routing, use the Teton service: Sierra Chart Teton Futures Order Routing |
[2024-09-20 19:19:14] |
User130696 - Posts: 88 |
Ok this makes sense, thanks for the hint on this.
|
To post a message in this thread, you need to log in with your Sierra Chart account: