This was a follower suggested script. This script shows an example of how to create a custom alert message using the alertcondition() function in pine. Features: - Well documented code with links to documentation for specific functions. - Two alertconditions in a different order than the plots they reference to show the importance of plot IDs. In order to...
Example how to overlay the first lower timeframe bar of the day across the entire day. Set chart to a timeframe that is lower than 1 Day period. Also included option for coloring wick pressure of that bar. NOTICE: This is an example script and not meant to be used as an actual strategy. By using this script or any portion thereof, you acknowledge that you have...
About this script: This example aims to highlight an alternative way to view HTF data by providing basic interpolation functionality. This script does not aim to provide use in itself as an indicator or strategy. Reason for study: Educational Purposes Only
Example how to automatically set the date range window to be backtested from X days or weeks ago to present. Additional options are also included to manually set the date range or to show entire range available. Normally when you change chart period it changes the number of days being backtested, which means as you increase the chart period (for example from 5min...
Example how to color patterns of 3 bodies growing or waning by percentage with or without trend. Also included option for alert triggers. The yellow triangles on the chart denote where the alert triggers will fire. • Choose Pattern Of Filter: shows bodies growing or waning or both. • Sample Lengths Of AvgBar: number of recent bars to use for average size. •...
Example how to backtest specific date(s) which can be useful for testing seasonality strategy ideas such as "Sell in May", etc. If using Daily period with wild card dates it will not trade on 1st day of month. If market is closed will trade on next open day. Works only with Daily or lower timeframes. When using on Daily timeframe set dates 1 day earlier to...
A simple example script showing how to use label.new() to plot pivot prices on the chart. A full tutorial and commentary is available on the backtest-rookies website.
Example on how to create custom grids with variable N lines/labels:
This is an example of how to reference higher timeframe data without the need for a 'security()' call. I have attempted to create the function example: f_insecurity() with the purpose of wrapping up and pumping out all common relevent HTF price data that's needed for your everyday indicators in a reliable fashion.
Simple signals example for Risk Management Wrapper The unique part is that there is a single variable used for both Buy and Sell conditions. Technically, a variable can have an infinity of values, so why not use that in our favour. A value of -1 is used for the SELL alert condition , and a value of +1 is used for the BUY alert condition . The Risk...
The retracement tracker function(s) in this script outline how to: Track conditions using "toggle" booleans. Use multiple coinciding conditions to trigger an event just once. What is a retracement? "Retracements are temporary price reversals that take place within a larger trend. The key here is that these price reversals are temporary and do not...
An example and overview of the syminfo and tickerid functions to be able to access different tools. Here is an example of accessing the Bitfinex exchange (and requesting "instrument name") when another exchange is open (BINANCE:BTCUSDT) There is a difference in name between BINANCE:BTCUSDT and BITFINEX:BTCUSD exchanges Try swapping // T =...
Example of applying polynomial regression channel to spreads or hedges between 2 assets.
Function to make it easy to display text information on the chart.
Ever wish you didn't have to rapidly flip between 6 different tickers to get the full picture? Yeah, me too. Do you also wish that you kind of understood how the shift / unshift function works for arrays? Yeah, I did too. Both of those birds are taken care of with one stone! The Macro Consolidated Interval Display uses the new Array structure and security to...
This script extends my other two Array examples (which I've also provided to you open source): The Ticker-centric 5m,15m,45m,1h,4h,1d resolution labels using arrays: And the more Macro VIX,GLD,TLT,QQQ,SPY,IWM 1d resolution labels using arrays: This script aims to show how to use min/max/avg with Arrays easily. My next example after this will be exploring the...
This is a simple strategy that demonstrates how to easily incorporate a date range into a strategy. This allows you to limit your backtesting to a specific range of dates, which is vital if you want to compare different time frames. To use: Copy the code block between the '////' lines into your strategy. Add the variable 'inDateRange' to your entry and/or...
Very simple, not very useful indicator. This is just to show someone that yes you can use a lower timeframe in your script calculations