English 中文(简体)
I have 20 assets in a MTF Screener in pinescript and I am only getting an alert for the asset who s chart I set the alert on
原标题:

I am working on a MTF Scanner for 20 assets. I have the script built and the alerts are triggering correctly, but only on the chart I set the alert on. I am trying to figure out why I am not getting alerts for all 20 coins, whenever the criteria is met.... I am not getting any errors at this point. Can anyone make any suggestions for me?

s01 = input.symbol( BTCUSDT , group =  Symbols , inline =  s01 )

GreenAnchor = GreenAreaCond
BlueAnchor = BlueAreaCond
RedAnchor = RedAreaCond
OrangeAnchor = OrangeAreaCond
GreenTrigger = GreenTriggerCond
RedTrigger = RedTriggerCond

AnchorTriggers = (GreenAnchor or BlueAnchor or RedAnchor or OrangeAnchor or GreenTrigger or RedTrigger)
AnchorTriggerConditions = (GreenAreaCond or BlueAreaCond or RedAreaCond or OrangeAreaCond or GreenTriggerCond or RedTriggerCond)

//                               Importing Data                               \
////////////////////////////// ~~~~~~~~~~~~~~~~~~ \\\\\\\\\\\\\\\
s01_TF1 = request.security(ticker.modify(s01, syminfo.session), TF(tf_period1, tf_multip1), AnchorTriggerConditions)


//ALERTS
alertcondition(bearCondition or bullCondition, title="Trending Bear or Bull", message="Background Changing to Green or Red, Price={{close}}, Trigger Timeframe={{interval}}, {{ticker}}, {{timenow}}")
alertcondition(enterLong or enterShort, title="Trigger Short or Long", message="Go Long or Go Short, Price={{close}}, Trigger Timeframe={{interval}}, {{ticker}}, {{timenow}}")

if bullCondition
    alert_message1=(syminfo.ticker + " Background Changing to Green. Price: " + str.tostring(close) + ". Interval: " + timeframe.period + ".")
    alert(alert_message1, alert.freq_once_per_bar_close)
else if bearCondition
    alert_message2=(syminfo.ticker + " Background Changing to Red. Price: " + str.tostring(close) + ". Interval: " + timeframe.period + ".")
    alert(alert_message2, alert.freq_once_per_bar_close)


if enterLong
    alert(syminfo.ticker + " Long = TF1 Green and TF2 FSR 20 Crossover. (Price: " + str.tostring(close) + ". Interval: " + timeframe.period + ".", alert.freq_once_per_bar_close) 
else if enterShort
    alert(syminfo.ticker + " Short = TF1 Red and TF2 FSR 80 Crossunder. Price: " + str.tostring(close) + ". Interval: " + timeframe.period + ".", alert.freq_once_per_bar_close) 
问题回答

暂无回答




相关问题
Pinescript to avoid immediate long/short entry

I am quite new to pine script coding and seeking some advice on the buy/sell alerts. When I tried to run the RSI strategy and back test it, I see that the long is immediately followed by a short entry ...

How to make my script to draw beyond 25 candles?

My script calculates the price distance between OHLC. I found this script online and modified it to suit my needs. The issue is that it only labels up to 25 candles. I believe there s something wrong ...

热门标签