7,259 questions
Advice
1
vote
2
replies
38
views
ta.highest doesn't work inside conditional
Original code https://pl.tradingview.com/script/Cb5QhBAl/
The structure from code below ( ta.highest ) doesn't work inside conditional structure. RdX1dX2 = length of a line. The ta.highest doesn't ...
Advice
0
votes
0
replies
41
views
How to create alert for array and UDT
I don't know how to create an alert for data from an array an UDT. I created int IsCrossingAlert, when it == 1 alert appears, == 0, there is no alert.
And how to remove line and create new from start ...
1
vote
1
answer
48
views
array.push() causes "Index out of bounds" after slice and copy on a user-defined type array
I've encountered a runtime error when removing a prefix of an array.
What I am trying to do:
I have a Detector UDT that maintains a history of Thing objects in an array. In certain situations, I need ...
Advice
0
votes
4
replies
114
views
Zig Zag horizontal lines
How to write, horizontal lines from bottoms ( LL LH ), tops (HH HL) ?
It gives information when it crosses (down and next up) bar.
It draws horizontal line from bottoms to crossing bar and gives me ...
Advice
0
votes
0
replies
44
views
Tradingview Pine Script: Adding a condition to UI-based volume alerts (not code generated volume alerts)
I like to carefully line up my mouse in the Volume pane and then right click to add Volume alerts on a symbol, and when I do this, the exact location of my cursor pre-fills the alert threshold with ...
0
votes
1
answer
44
views
Accessing higher timeframe data in Pine Script arrays without na checks
I am trying to create an indicator on the current timeframe, but its calculations are based on M15 data. I want to load the last 2000 candles of a specific higher timeframe into arrays and access them ...
2
votes
1
answer
76
views
Set Stop Loss and multiple TPs automatically
I am searching for a way to automatically set a Stop Loss and multiple TPs for a trade (either Market Order or Limit/Stop-Orders).
Example:
I would like to enter a buy position (3 contracts) on Nasdaq ...
1
vote
1
answer
79
views
Label at the specific UNIX timestamp not on the same bar between different charts
This is my test script
//@version=6
indicator("Time Loc Test", overlay = true)
unix = 1769990400000
var lb = label(na)
if barstate.islast and na(lb)
lb := label.new(unix, 0, xloc = ...
0
votes
0
answers
62
views
TradingView Pine Script Renko Call to HTF Alerts 1 Bar Late?
I'm working on a pine script strategy that trades primarily on the 1S Renko charts, but I want to get the direction of the 5M Renko chart, I'm using the following code below to make the call and ...
0
votes
0
answers
51
views
Plot weighted average of two ETFs on TradingView Supercharts
I've just started using TradingView Supercharts to primarily visualise the performance of ETFs. I currently just view plots of these ETFs on the Percent scale, all overlaid over one another. All these ...
0
votes
0
answers
64
views
changing the TP and SL trade level indicator bar colors generated by using the trade panel in TradingView
Is there any possible way to alter the TP and SL trade level indicator bar colors generated by using trade panel. They are too faint on almost every canvas color. The SL bar, box, and text are in a ...
1
vote
1
answer
141
views
Creating two pole oscillator in cTrader to use on my charts
I'm trying to translate the pine-script code to BigBeluga's Two pole Trading View Oscillator to use on my cTrader charts. The Trading View code is here:
https://www.tradingview.com/script/2Ssn4yDZ-Two-...
0
votes
0
answers
86
views
Reversing positions on Pinescript
I am using Pine script and want some help.
When I am in trade and my strategy generates opposite signal, how to make how close the current trade and open in the opposite direction. I am executing with ...
0
votes
0
answers
61
views
Bars get squashed when linefill is enabled
I encountered a bug when filling the colour between two vertical lines.
As soon as I enable fill, candlesticks get squashed.
I made this short script to demonstrate the problem.
//@version=6
indicator(...
0
votes
0
answers
71
views
How to plot with offset in multi-timeframe script?
I am developing pinescript indicator with multi timeframe support
indicator("My indicator", timeframe = "")
I want to plot somevalue with offset
plot(somevalue, offset = 5)
This ...