How to close all open trades on current candle when backtesting?
When working with Pinescript v5 in TradingView, how can I close all open trades on the current candle when backtesting? I would like to have a checkbox to activate such a “close all open trades for backtesting purposes” feature and tried several different approaches, but none worked.
how to plot high and loe of 3rd candle on an hourly chart
I need the high and low of the 3 hour candle on an hourly chart starting from the week.
Pinescript closing shorts with longs when pyramiding
i have setup conditions for entries on shorts and longs and have setup and open trades limit, set by the pyramiding value.
Pine Script plots last day of the month in next month’s first day – How to solve this?
I am just trying to plot a Monthly price range.
How can I create an order that includes a trailing stop and 2 take profits?
I have a strategy that includes a trailing stop, and 2 take profits. the trailing stop should close the entire position, and the first take profit should be a partial close (obviously).
how to draw line.new on recent X candle
Following are my code in pine script.
How to switch between Buy and Sell
How do I change the condition from Buy (current script) to also accomodate Sell
How to switch between Buy and Sell
How do I change the condition from Buy (current script) to also accomodate Sell
How do I Remove Indicator Script Version on Status Line?
CHART SAMPLE
How to add numerical values calculated from pine Script custom strategy to “Performance Summary”
AvgLongFirstDayLabel := label.new(bar_index, low – 10, text = “出现做多信号之后X天可以盈利:” + str.tostring(LongAvgFirstDay), style=label.style_label_up, color=color.rgb(255, 110, 110), size=size.normal) I wrote a strategy and calculated the value of “the first profit can be made on X day after the long signal appears”. Now I use a label to display this label on the last K line. I want […]