Questions tagged [pine-script-v5]

This tag should be used for questions relating to scripts and code built specifically on version 5 of Trading View's Pine Script language.

2372 questions
0
votes
1 answer

Line Cross then give signal once only and not repeat

I am looking for pine script coding with condition when pivot line here blue color of price 179.85 when any candle cross with green (close>open) then give signal, but only once. If in case again same situation come then avoid repeating…
rr1050
  • 3
  • 3
0
votes
1 answer

Trend Trigger Factor Indicator (TTF) in Python?

I am trying to convert TTF Indicator from TradingView Pine Script to Python. (with no plotting) This is the Pine Script code I am trying to convert: //@version=3 // Copyright (c) 2018-present, Alex Orekhov (everget) // Trend Trigger Factor script…
0
votes
1 answer

How do i make a cell take up 2 columns?

This what i have accomplished so far: var dashboard = table.new(position = position.top_right, columns = 3, rows = 5, border_width = 5, frame_color = color.new(color.white, 100)) table.cell(dashboard, 0, 0, text = "Trend", text_color =…
saleem
  • 41
  • 4
0
votes
1 answer

strategy.exit order not executing

When the Entry criteria is met the script places a stop loss order calculated from a percentage of the current buy price. The strategy is to have an order for the stop loss placed at open so that if that price is ever met the order just fills. This…
Evi1975
  • 5
  • 1
0
votes
1 answer

Pinescript multiple alerts for one condition

I am using my script with 3commas. I am trying to set alerts to when it flips from one direction to another like in the picture. What is the best way to write that in code? It seems that I cant send a close alert for previous trade to 3c when this…
Brenda L.
  • 1
  • 3
0
votes
0 answers

Data skip due to merge cell (Pinescript)

Can anyone help me.. Date is skip due to cell merge Hi, I'm displaying my date hortizonally and have cell merge but realize that the data was skip due to the merge cell. How can i rectify that
0
votes
1 answer

I want to set up a alert in tradingview when Engulfing candles touches one Moving Average line

I want to set up a alert in tradingview when Engulfing candles touches one Moving Average line. I created some part. But not able to define the touches of the enguling candles and moving average. Here is my…
0
votes
1 answer

How do I use an "array" as a Function variable?

We assume a generic function such as: [a,b,c] = Function (float Var1, float Var2) I want "Var1" to be an array of type float. How do I write the function? Regards (writing it as: array_new.float(Array, size) obviously does not work)...but you get…
0
votes
1 answer

Stoch security request setup

Another newby question. Im trying to get data from other timeframes on the macd and stoch. I have the macd working (i think) thanks to others on this site. Now that im trying to get the info for the stoch i have hit issues with the…
Juz
  • 17
  • 3
0
votes
1 answer

Need help converting this indicator to version 5

So I've been trying to convert this script into version 5 from version 1/2, and I can’t figure it out, I am not that experienced with old version under v4. //@version=1 study(title = "SuperTrend ATR + RSI", shorttitle = "SuperTrend ATR + RSI",…
0
votes
1 answer

Moving up/down % in 1 candle

I am trying to create a strategy that acts as the Moving up % / Moving down % function of the alerts, as shown in the image. The problem is that I can't find any function that allows me to replicate that behavior inside a strategy.enter image…
0
votes
1 answer

lock RSI screen to 0-100

is it possible to lock RSI screen range 0-100 only? //@version=5 indicator(title="Relative Strength Index", shorttitle="RSI", format=format.price, precision=2, timeframe="", timeframe_gaps=true) len = input.int(14, minval=1, title="Length") src =…
hafidzaini
  • 76
  • 8
0
votes
1 answer

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 alert many many times in a row. I created a…
Piner1337
  • 1
  • 1
0
votes
2 answers

I want to write a code to recognise inside bars of a large bar

I'm trying to write a code where if a following bar of an inside bar didn't break the high or low or both of the previous bar of the inside bar, then that bar should also be marked as an inside bar with different bar…
0
votes
1 answer

Is it possible to upload pinescript from local filesystem?

Is it possible to write my pinescript on my local filesystem and then upload it into TV? I've been looking in the docs and on SO but the only solution seems to be to copy and paste the script into the web-based editor. Ideally, I'd like to be able…