Skip to main content

Questions tagged [pine-script]

Pine Script is a domain-specific language for coding custom technical indicators and strategies on TradingView. Use this tag for questions related to programming in Pine Script. Please do not use the [tradingview-api] tag for Pine-related questions.

pine-script
0 votes
0 answers
3 views

Pinescript Code Merger error: line not visible

I wanted to multiplex an indicator belonging to Nadaraya Watson and get results based on two different values. For this, I named and combined the variables in the second code blog differently, but ...
Eserxm's user avatar
  • 1
0 votes
0 answers
6 views

Multiple HTF EMA

Why daily EMA20 is a stepping line not a smooth one. like weekly or monthly EMA string custTime = na if timeframe.isdaily or timeframe.isminutes custTime:=input.timeframe("D","Daily&...
Harender Singh's user avatar
-3 votes
0 answers
14 views

TradingView Strategy tester: question about operation in general

I know the principle of the strategy tester under NT8. It reads the information as it comes, as if time were passing, and applies the indicators. Depending on this, he opens or closes positions. If ...
Stéphane Perrot's user avatar
0 votes
0 answers
11 views

convert string to timestamp in pinescript

I'm importing a string that i then turn into an array. i would like to use the date and time values inside the array to draw lines from. The issue seems to be that a const string is expected. Is there ...
Karl Laeufer's user avatar
0 votes
0 answers
11 views

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/...
Celly's user avatar
  • 325
0 votes
0 answers
17 views

Pine Script request.security higher timeframe issue with Backtesting results

In a nutshell: I'm developing a multi-timeframe trading strategy in Pine Script. The strategy uses two moving averages (44-period and 777-period) calculated on the 1-hour timeframe to determine a &...
Pokeas's user avatar
  • 1
0 votes
0 answers
14 views

Cannot call operator with argument. An argument of 'series string' type was used but a 'simple string' is expected with request.security

I know this question has been asked many times, but some have got work around to this. I am facing issue when I want to get the current price of the index and add 2 strike above or 2 strike below ...
naim shaikh's user avatar
  • 1,103
0 votes
0 answers
13 views

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 ...
Jesse's user avatar
  • 1
0 votes
0 answers
16 views

RSI calculation for MQL4 and Pinescript Different?

When converting a indicator from MQL4 to Pinescript, I was able to get it to work, but the values displayed in pinescript and the original MT4 are quite different. I am tying to display the composite ...
Reubs Helps's user avatar
0 votes
1 answer
30 views

Pine Script Backtester Misinterprets strategy.order Scaling as Separate Trades

I'm developing a Pine Script strategy on TradingView with scaling entries positions. While strategy.order should ideally scale into an existing position, the backtester seems to interpret each ...
Pokeas's user avatar
  • 1
0 votes
0 answers
21 views

how to find highest and lowest value of ttm squeeze range

Hello im trying to find the highest and lowest value of ttm squeeze range. i tried using ta.highiest but kept getting study error. i wanted to try save it in a list, then use .sort to order it. //@...
zessor's user avatar
  • 11
0 votes
0 answers
15 views

Pine Script array syntax to display ROC on multiple instruments (BTC, ETH, etc)

The script below displays the rate of change (ROC) for multiple instruments (in this case, four BYBIT alt coins), as well as calculating the average ROC. It works, but I need some help with syntax to ...
Rowdy Bristol's user avatar
0 votes
0 answers
9 views

Pine script v5 - Plot/Draw previous closing prices and extend to right

I want to plot/draw a horizontal line of the previous closing price and extend to right till it is crossed. I need to extend all the closing prices which are not crossed. Time frame is any timeframe. ...
aganesan99's user avatar
0 votes
0 answers
9 views

Need to add built in alert into the exit logic

I'm trying to make it so that the alerts are generated by function calls only and I was able to get entries to work using the alert(" ") function, but I can't get it to work properly with ...
Lucas Barbou's user avatar
0 votes
0 answers
13 views

Retrieve Quarter/time from pine script request.financial()

I want to create a table with last 5-8 quarter financial data of a script and plot them as a table on the charts. I'm able to retrieve the financial data using the request.financial() method, but how ...
Om Prakash Das's user avatar

15 30 50 per page
1
2 3 4 5
496