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...
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.
- Defined points based on the confidence of RSI and Stochastic indicator
- Defined points based on...
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.
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 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...
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! ->...
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 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, price sources, lookback periods and resolutions.
- 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...
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...
type: pine series basic example
time required: 10 minutes
level: medium (need to know the "array" data variable as a generic programming concept, basic Pine syntax)
tl;dr how variables and series work in Pine
Pine is an array/vector language. That's something that twists how it behaves, and how we have to think about it. A lot of misunderstandings come from...
Um tutorial introdutório para quem está interessado em aprender a linguagem PINE para criar indicadores e backtests. Neste primeiro vídeo, explico alguns conceitos básicos e mostro como criar um indicador de médias com um filtro de cor.
Criei também um canal para quem quiser conversar sobre o assunto.
Vídeo --> www.filedropper.com
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.
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....
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.