Alert When ticker move more that 50 cents in 1 min


Category:
0
0

Hello

Is there any way we can create alert when everytime ticker SPY or any move 50 cents up on down then alert ring.

input SYMB = “SPY”;

def AD = close (symbol = SYMB, period = AggregationPeriod.day) – close(symbol = SYMB, period = AggregationPeriod.day)[1];

AddLabel(yes, “SPY” + ”:” + AD, if AD >= -0.50 then Color.Light_orange Else getcolor(5));

Marked as spam
Posted by (Questions: 12, Answers: 5)
Asked on October 1, 2019 8:37 pm
146 views
0
Private answer

We do this using the Study Alert. We don't do this using a chart study and your code has no use for this method. It is very important to note that your question title states you want to capture 50 cent moves within a single minute. Your code reads from the daily time frame and therefore is completely inadequate to deliver what you have requested.

The code is a single line:

plot alert = close > close[1] + 0.5 or close < close[1] - 0.5;

Screenshot below shows all the steps required to set this up.

Attachments:
Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on October 2, 2019 9:26 am