is the correct mechanism for receiving push notifications and SMS from a custom study??
MarketWatch → Alerts → Study Alerts
There are no compile errors
The alert engine accepted both scripts
Here is my study:
MarketWatch → Alerts → Study Alerts
There are no compile errors
The alert engine accepted both scripts
Here is my study:
Code:
# BTD LONG Alert
# Use on 5-minute SPX Study Alert
input atrReversal = 2.0;
input waitOneBar = yes;
def priceHigh = ExpAverage(high, 10);
def priceLow = ExpAverage(low, 10);
def ZigZag =
ZigZagHighLow(
"price h" = priceHigh,
"price l" = priceLow,
"percentage reversal" = 0.01,
"absolute reversal" = 0.05,
"atr length" = 5,
"atr reversal" = atrReversal
).ZZ;
# A new ZigZag point exists when the plot changes
def newPivot =
!IsNaN(ZigZag)
and (
IsNaN(ZigZag[1])
or ZigZag != ZigZag[1]
);
# Low pivot = BTD LONG
def rawLong =
newPivot
and ZigZag <= priceLow;
def longSignal =
if waitOneBar
then rawLong[1]
else rawLong;
plot BTDLongAlert = longSignal;
Last edited by a moderator: