Support Board
Date/Time: Sat, 18 Jan 2025 18:34:44 +0000
[Programming Help] - Alert formula request
View Count: 960
[2018-02-20 09:41:41] |
EuropeanTrader - Posts: 290 |
Hello everyone, can someone write an alert (for color bar study) when the following 2 conditions are met: 1. Bar is simply the widest trading range in last 4 bars (indicator widest bar with settings 4) AND at the same time: 2. Open and Close of the bar are both the at upper/lower 20% of the bar As seen here: http://www.sierrachart.com/image.php?Image=1519119639842.png Thank you if anyone can do this! |
[2018-02-20 13:44:05] |
infpz - Posts: 826 |
Try this: AND(H-L>H[-1]-L[-1],H-L>H[-2]-L[-2],H-L>H[-3]-L[-3],H-L>H[-4]-L[-4], (H-O)/(H-L)<=.2,(C-L)/(H-L)<=.2)
|
[2018-02-21 13:12:16] |
EuropeanTrader - Posts: 290 |
Thank you infpz - please see this: http://www.sierrachart.com/image.php?Image=1519218671859.png Calculation works to some extent, I marked bars that are also widest in last 4 bars and stil have this open and close 20% near daily high low Thank you! |
[2018-02-21 13:19:20] |
infpz - Posts: 826 |
Maybe it's too specific? See how it looks on mine: http://www.sierrachart.com/image.php?Image=15192191436.png
|
[2018-02-23 06:40:08] |
EuropeanTrader - Posts: 290 |
I think I figured it out, I have two indicators "color bar based on alert" 1) AND(H-L>H[-1]-L[-1],H-L>H[-2]-L[-2],H-L>H[-3]-L[-3],H-L>H[-4]-L[-4], (H-O)/(H-L)<=.2,(C-L)/(H-L)<=.2) 2) AND(H-L>H[-1]-L[-1],H-L>H[-2]-L[-2],H-L>H[-3]-L[-3],H-L>H[-4]-L[-4], (H-C)/(H-L)<=.2,(O-L)/(H-L)<=.2) Thank you for the initial idea! |
To post a message in this thread, you need to log in with your Sierra Chart account: