Login Page - Create Account

Support Board


Date/Time: Wed, 01 May 2024 19:03:00 +0000



[Programming Help] - Alert when Price is within 2 ticks from a Moving Average

View Count: 668

[2018-09-06 12:59:50]
User164231 - Posts: 278
Hi,

I am using this formula but it only triggers when touched. AND(H >=ID2.SG1,L <= ID2.SG1)

What is the code to use in order to have the alert triggered when price is within 2 ticks of nearing a Moving Average?
[2018-09-06 13:22:52]
Sawtooth - Posts: 3987
Try this:
AND(H>=ID2.SG1-TICKSIZE*2,L<=ID2.SG1+TICKSIZE*2)
[2018-09-07 06:11:37]
User164231 - Posts: 278
Hi Tom,

It worked perfectly!

Thank you very much.
Date Time Of Last Edit: 2018-09-07 06:39:12

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

Login

Login Page - Create Account