Login Page - Create Account

Support Board


Date/Time: Wed, 24 Apr 2024 12:37:06 +0000



[Programming Help] - trouble Setting up Alerts

View Count: 1078

[2018-06-20 21:24:22]
User298180 - Posts: 7
Hi I am trying to set up simple price alerts, the first one being when price crosses over the VWAP to get the colour of the bar to change, please see the attached picture that shows it is sometimes working but not always, also I have tried using the crossover function to create alerts but it doesn't seem to be working? thanks
imageVWAP ALERT2.PNG / V - Attached On 2018-06-20 21:19:56 UTC - Size: 121.61 KB - 281 views
Attachment Deleted.
[2018-06-20 22:17:54]
Xfanman1 - Posts: 320
Your formula is saying you want to color the bar only when C(Closing Price) is equal to VWAP. You want to capture if the bar crosses over VWAP so try this:

=OR(CROSSFROMABOVE(ID1.SG1,C),CROSSFROMBELOW(ID1.SG1,C))

This should color your bar if the bar crosses and Closes from below OR crosses and Closes from above VWAP. It will not capture wicks that touch your VWAP but don't cross between the Open and Close body of the candle.

--
Scott
Date Time Of Last Edit: 2018-06-20 22:23:09
imageCrossover.PNG / V - Attached On 2018-06-20 22:20:23 UTC - Size: 142.11 KB - 274 views
[2018-06-20 22:27:03]
User298180 - Posts: 7
Hi Scott, thanks for the quick response, I have just tried your code and it works a lot better, but is there a way where you can get it to trigger on wicks that just touch of a level as well? thanks dan
[2018-06-20 23:02:49]
Xfanman1 - Posts: 320
Using the L or H of the candle produced inconsistent results for me when testing for you. I would think there is another way to capture the wick movement too but it's beyond my limited knowledge at the moment. Maybe the Engineering team or another more skilled user will chime in and we'll both learn something.

--
Scott

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

Login

Login Page - Create Account