♥ 0 |
Hello I use this Outside bar reversal study: input aggregationPeriod = AggregationPeriod.HOUR; input showOnlyLastPeriod = no; declare once_per_bar; input BarMultiplier = 1.25; input BarsBack = 50; def MyCandleSize = (high – low); def AverageCandle = Average(MyCandleSize, BarsBack); def Bar = BarNumber(); def Long = if low < low[1] and close > high[1] and ((high – low) >= (AverageCandle * BarMultiplier)) then Bar else Double.NaN; def Short = if high > high[1] and close < low[1] and ((high – low) >= (AverageCandle * BarMultiplier)) then Bar else Double.NaN; plot LongSignal = if !IsNaN(Long) then low else Double.NaN; LongSignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP); LongSignal.SetLineWeight(1); LongSignal.SetDefaultColor(Color.GREEN); plot ShortSignal = if !IsNaN(Short) then high else Double.NaN; ShortSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN); ShortSignal.SetLineWeight(1); ShortSignal.SetDefaultColor(Color.RED); It triggers a buy/sell setup If the current bar is an outside candle. In this case it’s not my intention to use the script to do a scan on watchlist. Rather create an StudyAlert on just one symbol which send me an email every time a signal is triggered. I would like to get alerts by email, So I can those alerts use in Tasker. It’s an automation app for android. I like to create profiles around notifications which allows to determine under which circumstances notifications gets handled. This can be very handy to override a sound profile on android such as silent mode. I added a screenshot which shows a Buy signal and a Sell Signal. The Issue I get is when I want create the StudyAlert I receive the error: No such function: BarNumber at 13:11, which get triggered by: def Bar = BarNumber(); As mentioned in another thread ( https://www.hahn-tech.com/ans/how-do-i-add-custom-indicators-to-condition-wizard/ ) I copied and pasted the full code instead of just select the custom study. May be someone have an advice how to get it working.
Marked as spam
|
Please log in to post questions.