Relative Content

Tag Archive for pine-scriptpine-script-v5tradingview-api

calc_on_every_tick breaks with too many alerts

I have a strategy which needs to alert on the actual candle where the buy/sell signal occurs. By default Trading View only alerts on the next candle, so I’ve tried adding calc_on_every_tick which did what I need, however generated too many alerts in a row “Alert was triggered too often and stopped”

pine script strategy.exit() stop not working on a live chart

On historical bars the stop works fine but on a live chart the stop doesnt work correctly. If the stop level is met it will close on bar close. The take profit exits at the correct limit price, but its like the stop is acting like a market on bar close instead of a limit. I have a large code section to give as much detail on the relevant section of the code as possible.

How to compare two strategies in one pine script v5

I have a script for buy/sell strategy with data output. This is done for one MA. It is working fine and gives the desired data.
However since Im on the basic plan, I cannot have many indicators/strategies open at the same time. Right now, I have to go to options and change the MA input from eg. 10 to 9 and see the output. This is very tedious to do for 6 different MA’s, for the D, W and M chart for each stock.

Multiple HTF EMA

Why daily EMA20 is a stepping line not a smooth one. like weekly or monthly EMA

How pinescript V5 applies external data

I want to use Pinescript to quote BTC’s contract positions, but unfortunately tradingview does not have this data. I can only consider quoting from outside. How should I use Pinescript to drink it?