Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
47 views

Assistance required with specific alert conditions on a complex pine script

i have attempted to add alerts to the following Pivot point script but i can't get it to function correct. // This Pine Script™ code is subject to the terms of the Mozilla Public License 2.0 at https:/...
dawid theron's user avatar
-1 votes
1 answer
41 views

How to add this conditions to alert ? - Pine script tradingview

My condition is i want the alert to notify me when there is a candle that closes more than 1% in upward or downward move. i tried various things but could'nt figure it out. i want the exact pine ...
harpal singh's user avatar
0 votes
0 answers
93 views

I need to set alert for SL and TP of the following Pinescript code indicator

I need to set alert for SL and TP of the following Pinescript code indicator.thanks in advance.It already has alert for Buy and Sell. I just need alert for SL and TP no matter if it is for Buy or Sell....
iman majidi's user avatar
0 votes
0 answers
58 views

Issue with Alert in a Screener in Pinescript/TV

I have a script that sound like this: //@version=5 indicator('XY Screener', shorttitle='XY Screener', overlay=false) //EMA ema1 = ta.ema(close,7) ema2 = ta.ema(close, 14) ema3 = ta.ema(close, 28) ...
GiancarloT's user avatar
1 vote
1 answer
358 views

Pine script arbitrary variable in alerts

I'm facing difficulties with adding arbitrary variable values from the pine script to Tradingview alerts. It seems the list of variables if limited by standard placeholders. They include: {{ticker}} |...
Evgeny Mamaev's user avatar
1 vote
1 answer
332 views

Pine script `strategy.order.alert_message` is empty

I've got the following setup. Pine script v5: strategy.entry("Short", strategy.short, alert_message = str.tostring(syminfo.mintick) + " " + str.tostring(local_variable)) ...
Evgeny Mamaev's user avatar
-1 votes
1 answer
563 views

Problem with getting alerts from the TradingView strategy

I want to modernize the TradingView strategy code to send alerts Open Long and Open Short to a specific WebHook address with a Once Per Bar Close trigger. But I encountered a problem. When I use "...
Danny Walker's user avatar
0 votes
1 answer
1k views

Heikin Ashi Candles and how to set a strategy to enter a trade before the candle closes?

I have a fairly successful strategy on the daily timeframe that I use with a Heikin Ashi candle indicator and leveraged ETFs. An issue I’m running into is that the close of the Heikin Ashi candle ...
Jerry Roach's user avatar
0 votes
0 answers
42 views

TV Alert after MA 200 crosses price and new candlestick opens

The code gives me alert when MA 50 crosses over MA 200. I want it modify to receive alert based on the condition that MA 200 crosses price and a new candlestick opens above MA 200. This is my current ...
Hilary2b's user avatar
0 votes
1 answer
446 views

How can I modify my TradingView Pine Script to generate alerts upon color change for Heiken Ashi candles?

I have tried to add a simple buy / sell alert to the following script in heiken ashi , the challenge is to get a buy alert when the trend (heiken) candles change from Red to green and sell alert when ...
user1466588's user avatar
0 votes
1 answer
90 views

Alert Condition Pine Script 5

I copies this script from Stackoverflow and made some minor adjustments to it. My problem is that my Buy/Sell code does not work My Script: //@version=5 indicator('Prev Day Hi Lo Lines', overlay=true) ...
user21637228's user avatar
0 votes
1 answer
27 views

2 Alerts conditions in Script but only 1 can be selected

I have added 2 conditions in the script, one alert should fire when SMA crosses the other SMA upwards, to other alert when the SMA cross the other SMA downwards. This is the script: //@version=5 ...
ChrischnLOK's user avatar
0 votes
1 answer
281 views

Tradingview strategy alert works without any position

The code below helps me to enter long positions with the conditions I defined. The code triggers alerts to open and close long positions on the exchange I am using. However, the code sometimes ...
kvck's user avatar
  • 3
-2 votes
1 answer
123 views

How to convert pine script to strategy & generate alerts

The below script is working fine and is generating signals, but not able to convert this into strategy and generate signals study("Trend Magic", shorttitle="TM", overlay=true) CCI =...
pavs's user avatar
  • 1
1 vote
1 answer
641 views

strategy.position_avg_price returns "NaN" on alert when triggered in Pinescript

My code on trading view pine script is returning me "NaN" for strategy.position_avg_price when alert is triggered. It works when I back test it. However when I test it live, it is giving me &...
Marcus's user avatar
  • 11
1 vote
1 answer
520 views

Why can I use this webhook in Postman and not in TradingView alerts?

When I send this POST using POSTMAN the text 'Hello World' is added to a Google Sheet. https://script.google.com/macros/s/AKfycbwXdAoAnggrOL2NXhyIi7L2uQKKv4bmZjg_Z67VYi6jUuNp5HmiTw78ARGVZWSHYaM7/exec?...
Paddy's user avatar
  • 15
0 votes
0 answers
267 views

Repainting script even after using barstate.isconfirmed

Below script is firing multiple alerts and I have tried using barstate.isconfirmed but still firing sometimes up to 6 alerts together. I am a beginner to this. //@version=5 strategy('STG1', overlay=...
Bhupen M's user avatar
1 vote
1 answer
5k views

Pine Script Strategy Alert - How to add to my script?

I'm trying to figure out how to add an alert for "buy" and "sell" on my strategy script. I want to be able to select buy or sell in the alert window. I need to use the message area ...
HuskyReign's user avatar
0 votes
1 answer
989 views

PineScript - How to fire Alert only once? Trigger variable stops the alert

I have a condition on higher timeframe when the alert must be triggered and it works fine, but this condition may last for hours and I have the alert on a smaller timeframe, so I keep getting the same ...
Piner1337's user avatar
0 votes
1 answer
334 views

Loop array Alert only showing array 0

i have written a pinescript using array ( with parts borrowed from others). Once i put it up on tradingview and ran it is working but the problem is that when i get an alert, it sends the alert for ...
Juz's user avatar
  • 15
0 votes
1 answer
930 views

Pinescript multiple 'alert.freq_once_per_bar' alerts on a single bar

I've recently been having some issues regarding Pinescripts alert() functions, specifically regarding the 'freq = alert.freq_once_per_bar' aspect of the alerts. I have been receiving duplicate alerts ...
Oxelo's user avatar
  • 7
1 vote
1 answer
513 views

Prevent alert triggering on consecutive signal

I set up these two alerts: alertcondition(bar_close > bar_open, 'BUY/LONG', 'BUY_ALERT') alertcondition(bar_close < bar_open, 'SELL/SHORT', 'SELL_ALERT') They work as a trigger on confirmed ...
bat_cmd's user avatar
  • 158
0 votes
1 answer
133 views

TradingView Pine Script - Is there any way to create an alert in this script?

I want a simple alert that triggers when the indicator changes from red to green or green to red (the last 2 dots are different colors), but because it uses line.new I can't figure out how can I do it....
Stan George's user avatar
-1 votes
1 answer
72 views

Custom alert in indicator

I want code that alert in ll when just cross hl and alert hh when just cross lh note : I don't need alert LH or HL HH(cross HH) and LL(cross LL)
mobinalizadeh's user avatar
0 votes
2 answers
183 views

Adding Alert to EMA Cloud Fill PineScript Code Based on Color Change

I am trying to add a code to a script I found to simply add alerts on the ema cloud based on color change. I tried to add. This is part of the script: ///////////////plot MAs plot_ma1 = plot(MA1, ...
Phosphorus's user avatar
0 votes
1 answer
125 views

Showing the coins suitable for the strategy in the alarm message as a result of scanning in Pine Script v5

With the request.security command, I scan many coins according to the purchase condition I have determined. The coins that are suitable for my strategy are listed and I can see it with the label tag. ...
goksel's user avatar
  • 1
0 votes
2 answers
1k views

How to get Alert ( of EMA crossing VWAP) on Multiple Stock that are added in my Wishlist using pinescript. I tried using crossover but that failed

indicator("Dynamic alert",overlay= true) emaValue = ta.ema(close,5) vwapValue = ta.vwap(hlc3) f_triggerBuy(_ticker)=> if (crossover(emaValue, vwapValue)) _msg := "EMA5 Crossed ...
shailendra mishra's user avatar
0 votes
1 answer
216 views

Formatting the text in the message

We haven't talked for a long time. Faced with the problem of formatting the text in the message. It is required that the message is displayed in several lines with spaces on the left. The test sript ...
AnyDozer's user avatar
  • 2,568
0 votes
1 answer
3k views

Use Take Profit and Stop Loss Alerts in TradingView

I have followed the answer Here to implement a Stop-Loss and Take-Profit by percentage in one script as a strategy as the code is shown. However, now I wanna convert this strategy into an indicator v5 ...
David Buik's user avatar
1 vote
0 answers
29 views

How to have 2 alerts pop up in the same k bar

if L_basic_condt strategy.entry ("L", strategy.long ,...
killerswilson's user avatar
0 votes
0 answers
343 views

Alert after price crosses MA, BUT wait for x amount $ to drop or rise

I'm new to coding and I'm trying to code an alert that triggers when the price moves a specific amount of $ above or below after an MA cross. I've tried different things, and now it's gotten so ...
Jean-Philippe Veilleux's user avatar
1 vote
1 answer
2k views

The script calls alert after 2 candles after the condition to buy triggered. How do I fix the delay?

The VuManChu Cipher B + Divergences indicator script shows the buySignalDiv condition on the chart as a big green dot, but the alert is triggered only after 2 bars confirmation. here is example of ...
SomeUser's user avatar
0 votes
1 answer
251 views

alert for Ichimoku setup in diffrent timeframes

Hi I am new to Pine and would like tyo ask if it possible with Pine to write a program that sends me an alert when in ichimoku indicator, the conversion line is above the baseline on the 4 hr, 1 hr, ...
Joseph's user avatar
  • 19
0 votes
1 answer
96 views

How to code this alertcondition in prine script

I have two separate indicators, EMA1 is a ema and EMA2 is a wma. I would like the same alert condition for both indicators for example alertcondition(EMA1 = open or high or low or close or EMA2 = ...
Anthony Brannum's user avatar
0 votes
1 answer
919 views

How to customise 2 simultaneous alerts in one pinescript for different timeframes

I am having 2 different indicators from trading view scripts. I want the first indicator to work on an hourly timeframe. And once the buy or sell triggers in 1st indicator on 1 hr chart, I want the ...
Vinod Sharma's user avatar
1 vote
0 answers
367 views

Force study alert at candle close

Small question, I use 3 indicators that I have combined into 1 to send webhook alerts for more simplicity The problem is that this indicator can often give me 2 signals in a row at the close of a ...
Mathabinie's user avatar
0 votes
1 answer
333 views

Alert condition question when conditon changes

I became member to this site just to ask this question. I would be glad if you could help me solve this issue. I am not a programmer and have no experience whatsowever. This is part of a pine script ...
Goktug Yucel's user avatar
0 votes
1 answer
49 views

2 alerts from 2 identical scripts not working properly

I have created a strategy for pair 1 which has this syntax to open and close positions: strategy.entry(id='long', direction=strategy.long, when=buy_signals, alert_message = '{...."pair":&...
Michael's user avatar
  • 25
0 votes
1 answer
1k views

Indicator alert not working because of "side effects"

this is my first post! I´m trying to write a Pine script, actually just adding an alert when the price crosses over a lower band of a slightly modified BB indicator. When I try to add it to the chart ...
Muyrakitan's user avatar
1 vote
1 answer
351 views

I would like the indicator to send buy/sell-signals when the HullMA changes color

The code looks like this: study(title = "Hull MA", shorttitle="HMA", overlay = true, resolution="60") length = input(48, minval=1) price = input(close, title="Source&...
Daniel Bauer's user avatar
3 votes
1 answer
3k views

How to send alert at a certain time

I'd like to write a pine-script that will send me a report of the stock, says, it's pivot points, rsi, etc ... at 7am every morning and 3pm when mrkt close. I know how to do the alert, it's the ...
user15088974's user avatar
0 votes
1 answer
535 views

How can I make the value of an indicator appear in an alert message?

as the title suggests I would like to have info on how to make the value of an indicator appear in an alert message. In a nutshell, I need that in the message appear in addition to the price of eur / ...
Marco Pasquale Accolla's user avatar
0 votes
1 answer
139 views

How can I line up alerts and order placement?

I have coded a strategy in Pinescript on TradingView and created an alert when strategy.entry meets its conditions, my question now is, sometimes the alert triggers on the strategy.entry while the ...
Robert de Vries's user avatar
0 votes
1 answer
752 views

How to Make alert fire only once when long/short? common solution not working

Problem: getting alert firing on every candle condition: early_sell_signal I am trying this method to prevent alert when already bearish bearishPosMem = false bearishPosMem := bearish ? true : bullish ...
Trusty777's user avatar
0 votes
0 answers
2k views

Tradingview Pine Script alert based on candle color from

I have a paid subscription for an indicator however the code for the indicator is not provided. The indicator changes the colors of the candles when necessary. I am trying to setup an alert when the ...
ds882's user avatar
  • 105
0 votes
1 answer
308 views

Tradingview alertcondition(condition, title, message)

I want to create an alert condition whenever ema(close,20) > ema(close,50) > ema(close,100) is true along with other conditions from the original script. This for Buy alert. Reverse is for sell. ...
Winter Soldier's user avatar
1 vote
0 answers
190 views

Tradingview Alert

I don't know how I can make alerts when the dots appear in the indicator. Has anybody enough knowledge to do this? Here's the link with the code. study("Semafor", overlay=true) zigzag(Depth,...
Tozey's user avatar
  • 11
-1 votes
1 answer
2k views

How to create an alert in pine script depending on the result of dynamic label?

(Edited) Hello, I'm trying to include alerts from this indicator I found in Tradingview. Indicator: TradingView I need 4 alerts when the current candle is greater than HH and LH or lower than LL and ...
LFranco's user avatar
  • 11
0 votes
1 answer
1k views

How can I send alert on color change on RSI graph in pine-script

I am using the following script taken from (https://in.tradingview.com/script/fH6e5TuN-RSI-Divergence/). study(title="RSI Divergence", shorttitle="RSI Divergence") src_fast = ...
alper's user avatar
  • 3,361
0 votes
1 answer
352 views

Tradingview :Alert not working when momentum line changes from green to red. It alerts every 15 min when set on 15 min time frame :Tradingview

Its momentum 4 ways smoothed when its oversold or overbought it changes color //@version=4 study("Momentum 4 Ways Smoothed [Salty]", shorttitle="Momentum4WaysSmoothed") src = input(ohlc4, title="...
Denish Patel's user avatar