Hello,
I do not know if I fully understand alerts in paintbar, but as I looked into the documentation, everything should be working, but it isn't.
My goals is to set an alert, that would be triggered if the closing price of 1min candle crosses a VWAP.
For that my code looks like this.
if (Close.CrossesUp(VWAP_Line, 0)) { SetColorAndShape("vwap cross up", PBShape.ArrowUp_Hollow, 0xFF93FF99); TriggerAlert("VWAP crossed up", @"Price crossed up the VWAP"); }
if (Close.CrossesDown(VWAP_Line, 0)) { SetColorAndShape("vwap crosses down", PBShape.ArrowDn_Hollow, 0xFFFF4E4E); TriggerAlert("VWAP crossed down", @"Price crossed down the VWAP"); }
Although, even when the closing price crosses the vwap, no alerts are triggred.
So I tried simple scan/alert, that should alert if the price is above 100$ or below.
The scanning worked.
But no alerts were triggered.
I tried to set up the same alert in alert editor and it worked, but in alert editor, there's not enough customization. I need alerts for my portfolio that trigger when prices cross something. Scanning result is simply not enough, since it can be easily overlooked.
I hope I am not missing something.
Thank you so much.