Example how to set the time range window to be backtested for both entries and exits. Additional examples are also included showing how to set the date range and toggle plot visibility. By incorporating this code with your own strategy's logic, it will allow you to backtest various time windows. Much gratitude to @LucF and @a.tesla2018 for help with including...
This script shows a sample of how to do confidence weighted scoring indicators and for loops with Pine. This indicator may or may not be found useful, it's intent is to provide a sample on how to create such an indicator and use certain Pine features. Features: - Defined points based on the confidence of RSI and Stochastic indicator - Defined points based on...
Example how to color the trigger bar of the condition and n-1 prior bars using only 1 barcolor() function. Currently when offsets are used in barcolor(), bgcolor(), plot(), plotarrow(), plotchar(), or plotshape(), the offset only works with a simple (static) integer. If series (dynamic) integers are used instead, there is not an error, but the series values are...
This script is for a triple moving average indicator where the user can select from different types of moving averages, price sources, lookback periods and resolutions. Features: - 3 Moving Averages with variable MA types, periods, price sources, resolutions and the ability to disable each individually - Crossovers are plotted on the chart with detailed...
Simple script to view Heiken-Ashi candles below a normal candles chart. Could also be useful for using HA calcs in strategy scripts on normal candles chart for proper backtesting. I adapted this to v4 from original v2 script by @samtsui. If you like please remember to give him a Thumbs Up for his original version! ->
This smoothed RSI indicator is designed to allow users to try and identify periods of extended time in oversold and overbought areas using a smoothed RSI value. Features: - RSI - Period - Source - Resolution - Visibility - Smoothed RSI - Period - Moving Average Type - Visibility
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...
This script is for a triple moving average indicator where the user can select from different types of moving averages and periods. This script improves upon tutorial 3 by adding source selection for MAs and another option for an MA that is not built-in, the HMA . It is meant as an educational script with well formatted styling, and references for specific functions.
This script is for a triple moving average indicator where the user can select from different types of moving averages and periods. This script improves upon tutorial 3 by adding source selection for MAs and another option for an MA that is not built-in, the HMA. It is meant as an educational script with well formatted styling, and references for specific functions.
This script is for a triple moving average indicator where the user can select from different types of moving averages. It is meant as an educational script with well formatted styling, and references for specific functions.
This script is for a triple exponential moving average indicator. It is meant as an educational script with well formatted styling, and references for specific functions.
This script is for a simple moving average indicator. It is meant as an educational script with well formatted styling, and references for specific functions.
This strategy is just for training, its purpose is just learning code in pine script. Don't make buy or sell decision with this strategy. Turkish/Turkce Bu strateji sadece pine script'te kodlamanın nasıl yapildigini ogrenmek icindir. Bu stratejiye dayanarak, kesinlikle al-sat islemleri yapmayin. How it works? When RSI and Stoch are in oversold area and if...
Example of how to apply and use Dynamic Zones with an indicator by injecting it's source into my adaptation of the original idea by Leo Zamansky, Ph.D., and David Stendahl. • Load your desired oscillating indicator on your chart (CCI, RSI, etc). • Load my "How To Use Dynamic Zones" indicator on your chart. • In the "How To Use Dynamic Zones" indicator settings...
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...
Problem Pine's implementation of the security() function behaves differently in realtime vs. historical bars. Specifically, for historical bars, calling security() for a time frame (TF) larger/slower than the current chart's TF will return information about the last completed bar of the higher TF. However, for realtime bars (i.e. if you allow the chart to...
After a long gap, I have written the 5th tutorial for the pine script. You can find the others below, if you read through all of these you should be good to do your own writing. This script mimics the Trading View Indicator . For example this one below. www.tradingview.com It shows the net result of the 28 indicator, either as buy or sell. I...
I was curious to see what Pine uses to accumulate numbers. It looks like it uses the simple "add em up" approach, rather than a compensated summation. This means that especially for large numbers, there is an inherent error amount. This script implements the Kahan Summation Algorithm, also known as compensated summation. en.wikipedia.org This is part 2 of my...