Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 22:26:45 +0000



[Programming Help] - Alert Formula to filter out bars touching Moving Average too many times

View Count: 499

[2020-08-08 14:39:17]
User164231 - Posts: 278
Hi guys,

I create an alert for 20ema on 5 min candles. I only one the first signal because if the price did not bounce off the next signal triggered when bar touching the 20ema is not needed.

How to filter out subsequent bars (say next 20 bars) touching of 20 ema? Thanks.


AND(H>=ID1.SG1-TICKSIZE*2,L<=ID1.SG1+TICKSIZE*2)
Date Time Of Last Edit: 2020-08-08 14:42:19
[2020-08-08 15:39:27]
Sawtooth - Posts: 3985
Try this for a touch from below:
=AND(H>=ID1.SG1-TICKSIZE*2,H[-1]<ID1.SG1[-1]-TICKSIZE*2)

And this for a touch from above:
=AND(L<=ID1.SG1+TICKSIZE*2,L[-1]>ID1.SG1[-1]+TICKSIZE*2)

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

Login

Login Page - Create Account