π #news
For the quants out there, a new script publication by alexgrover to evaluate filters.
https://www.tradingview.com/script/oTEP9DJF-Filter-Information-Box-PineCoders-FAQ/
For the quants out there, a new script publication by alexgrover to evaluate filters.
https://www.tradingview.com/script/oTEP9DJF-Filter-Information-Box-PineCoders-FAQ/
TradingView
Filter Information Box - PineCoders FAQ β Indicator by PineCoders
When designing filters it can be interesting to have information about their characteristics, which can be obtained from the set of filter coefficients (weights). The following script analyzes the impulse response of a filter in order to return the followingβ¦
πͺ #tip
Books
We have a short list of books on trading systems and techniques here:
https://www.pinecoders.com/books/
Books
We have a short list of books on trading systems and techniques here:
https://www.pinecoders.com/books/
πͺ #tip
How to format values to tick precision with `tostring()`
We have a very useful new
How to format values to tick precision with `tostring()`
We have a very useful new
f_tickFormat()
function that does this in our FAQ. Kudos to DayTradingOil for the original idea.πβοΈ #bugfix
There was a bug with the
https://www.tradingview.com/x/wxstnMDz/
πͺ #tip
Keep in mind that to prevent fills between plots you have 2 options:
1. Plot
2. Set the fill's color to
fill()
There was a bug with the
fill()
function where if you plotted a single value surrounded by na
values, it could not be filled. The fill shown here would not appear before. Now it does.https://www.tradingview.com/x/wxstnMDz/
πͺ #tip
Keep in mind that to prevent fills between plots you have 2 options:
1. Plot
na
on one of the 2 plots or both.2. Set the fill's color to
na
conditionally.π #news
"Maximum order quantity exceeded 3000" error
The error is caused by a problem introduced in a recent update. ETA on the fix is one week.
"Maximum order quantity exceeded 3000" error
The error is caused by a problem introduced in a recent update. ETA on the fix is one week.
πβοΈ #bugfix
Alerts configured on code using `barstate.isconfirmed` now work as expected.
Alerts based on this code would never fire before. They now do.
Alerts configured on code using `barstate.isconfirmed` now work as expected.
Alerts based on this code would never fire before. They now do.
//@version=4
study("")
alertcondition(barstate.isconfirmed, "Alert")
π² #newfeature
security()
can now return tuples.//@version=4
study("", "", true)
f_hiLo() => [high, low]
[hi, lo] = security(syminfo.tickerid, "D", f_hiLo())
plot(hi, color=#FF0000ff)
plot(lo, color=#00FF00ff)
π #news
PineCoders Coding Conventions
We updated the Variable Names section of our Coding Conventions with a few additions. We also link, at the end, to a few scripts showing the Conventions in use.
PineCoders Coding Conventions
We updated the Variable Names section of our Coding Conventions with a few additions. We also link, at the end, to a few scripts showing the Conventions in use.
πβοΈ #bugfix
Phase 1 of the new
display = display.none
A change was made to its behavior, to bring it in line with the original specs for the feature, which specified no display of the plot or its values anywhere, as it was meant to be used for plots intended for external signals and placeholders in alert messages.Phase 1 of the new
display=
parameter for plot functions is now complete. Phase 2 has no ETA yet, but will include other arguments for the display=
parameter:display.chartWhen Phase 2 is deployed, you will be able to combine these to control exactly where a plot's values are to appear.
display.data_window
display.price_scale
display.indicator_value
π² #newfeature
Changes to
The
This will be handy in conjunction with the new "Same as Symbol" choice which is now part of the recent resolution widget's dropdown, which appears in the script's Inputs when you use:
When users select "Same as Symbol" in the dropdown, the widget returns an empty string. As we had documented here, coders previously had to use special logic to process an empty string, as
Note that the default value we supply in the
Changes to
security()
's resolution=
parameter.The
security()
function was recently updated to accommodate an empty string or na
as an argument to its resolution=
parameter. In both cases, the chart's resolution (timeframe.period
) will be used.This will be handy in conjunction with the new "Same as Symbol" choice which is now part of the recent resolution widget's dropdown, which appears in the script's Inputs when you use:
r = input("D", type = input.resolution)
When users select "Same as Symbol" in the dropdown, the widget returns an empty string. As we had documented here, coders previously had to use special logic to process an empty string, as
security()
would throw an error if an empty string was used for the resolution. Now, we can forego the special logic and simply write:r = input("D", type = input.resolution)
c = security(syminfo.tickerid, r, close)
Note that the default value we supply in the
input()
call must be one of the dropdown's choices (or an empty string for "Same as Symbol), otherwise "Same as Symbol" will be used in its place.Telegram
PineCoders Squawk Box
π² #newfeature
Change to `input()`'s `type = input.resolution` widget
A new feature of the resolution widget allows the selection of the chart's timeframe ("Same as Symbol"). This code shows how to use it, including how to make the chart's resolution the default.β¦
Change to `input()`'s `type = input.resolution` widget
A new feature of the resolution widget allows the selection of the chart's timeframe ("Same as Symbol"). This code shows how to use it, including how to make the chart's resolution the default.β¦
πβοΈ #bugfix
Plotting
Prior to this fix, using either of:
with
Plotting
na
when using histogram, area or columns mode no longer puts zero in play in the indicator's scalePrior to this fix, using either of:
style = plot.style_histogram
style = plot.style_area
style = plot.style_columns
with
plot()
would always put the zero value in the indicator's scale, even when plotting na
. This is no longer the case.π #newfeature
Plots disabled in Settings/Style no longer appear in the Data Window
Continuing to show plots in the Data Window when users disabled them from the Settings/Style db confused users, so unchecking them in the Settings/Style db now also hides them in the Data Window. See in these screenshots how
NOTE: This recent change has also introduced behavior which will cause user-selected transparency levels from the Settings/Style db to be reflected in the value rendered in the Data Window, whereas before, the value was always rendered with transparency zero. The transparency of
Plots disabled in Settings/Style no longer appear in the Data Window
Continuing to show plots in the Data Window when users disabled them from the Settings/Style db confused users, so unchecking them in the Settings/Style db now also hides them in the Data Window. See in these screenshots how
Plot 4
plot does not appear in the Data Window, nor in the Indicator's Values.NOTE: This recent change has also introduced behavior which will cause user-selected transparency levels from the Settings/Style db to be reflected in the value rendered in the Data Window, whereas before, the value was always rendered with transparency zero. The transparency of
Plot 1
was changed to 50% in the Settings/Style db here. We will try to have this side effect corrected.π #news
The Pine news/updates/tips we periodically post here are also posted in the Pine Script room on TradingView.
The Pine news/updates/tips we periodically post here are also posted in the Pine Script room on TradingView.
TradingView
TradingView online real-time trading chat rooms
Chat with thousands of traders around the world in real-time. Never be alone with the markets again, ask traders for feedback, opinions and ideas. Choose from popular public chat rooms based on interests, or start a new private chat with someone new!
π #news
The recent problem where existing scripts are throwing the:
Pine cannot determine the referencing length of a series. Try using max_bars_back in the study or strategy function.
error can usually be fixed by using
The recent problem where existing scripts are throwing the:
Pine cannot determine the referencing length of a series. Try using max_bars_back in the study or strategy function.
error can usually be fixed by using
max_bars_back=300
in your study()
or strategy()
declaration statement.π² #newfeature
A new
See how the "Moving Average" built-in from the Editor's "New" menu uses it. Make sure you are comfortable with the feature before publishing scripts using it. The HTF values returned contain gaps.
A new
resolution=
parameter to study()
provides coders with a simple way to give their script MTF functionality without using security()
.See how the "Moving Average" built-in from the Editor's "New" menu uses it. Make sure you are comfortable with the feature before publishing scripts using it. The HTF values returned contain gaps.
π #news
midtownsk8rguy has updated his color chart. Labels make it easier to identify colors. This is a good and pretty complete selection of colors that work well:
https://www.tradingview.com/script/yyDYIrRQ-Pine-Color-Magic-and-Chart-Theme-Simulator/
midtownsk8rguy has updated his color chart. Labels make it easier to identify colors. This is a good and pretty complete selection of colors that work well:
https://www.tradingview.com/script/yyDYIrRQ-Pine-Color-Magic-and-Chart-Theme-Simulator/
β€1