I'm trying to create a crypto trading strategy in TradingView, and everything was going well until my script decided to upgrade to v5. Everything works, but whe
Hello I isolated code which cause this strange behavior. It is caused by variable price. Is there way around? //@version=5 strategy("My script",overlay=true)
I'm building a strategy using Pine Script Version 5. I'm trying to create a stop order using strategy.order command. The command is working as expected and exec
//@version=5 indicator(title='Rsi color', shorttitle='RSI col', overlay=false) theme = input.string(defval='Dark', title='Colors', options=['Candy', 'Dark', 'L
I'm new to Pine script, please, anyone explain me exactly what this high[abs(highestbars(amplitude))] statement returns, specially in highestbars(2) definition
How do i prevent orders from remaining open and executing later. For long entries i have a buystop = high, so if the next candle the price doesn't hit the high
I am trying to draw a trend line connecting previous pivot highs and previous pivot lows IF the last pivot high is higher than the previous pivot high AND the l
There you can see two horizontal (dotted white) lines on the chart below, placed manually. Is it possible to make the script retrieve their locations?
I want to apply a function to pause the strategy for xx hours or bars after win trade, how to do that? because my strategy is trending so there is always a peri
I would like to convert this script from version 2 to version 4 or 5 in order to create buy and sell alert messages. Can someone help me with this or explain it
I am creating multiple indicators - ideally to be used together. Since many levels share the same coloring, I was wondering if I can get the color a user may sp
Trying to learn Pine script here to optimize my trading strategy. I have around 1.5 year of experience trading. The trendsystem Im using is the all mighty Ripst
I'm trying to hunt down a bug. My strategy wouldn't close, even if the closing criteria is met. I checked multiple point manually, using the Data Window which c
I am getting an Undeclared identified 'd' error. This was converted from an indicator that had alerts. But when I had them in TV nothing would happen. I can't s
There is a simple script on Pine. When executing strategy.entry, I try to draw a horizontal line at the level of the trade entry price. The only way I found to
In one hour timeframe I am trying to study the four days of daily candles to know the trend to create an indicator on the 1 hour chart if I should make a sale o
I'm trying to put together a var cross flag to determine if the price crosses above the previous days' high. This is for a screener so further security requests
im unable to move the stop loss to the entry price when i sell half of the position i have the entry price working and can get the price for the stop loss but i
I want to create a series in which every value is normalized to the value of a particular element in the series, for example the latest value. If you try syntax
i want to do a strategy that entries a position at the buy-level (blue Line) and sells after reaching the take-profit-Level (green line) or the stop-level (red