<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tuned</title>
	<atom:link href="https://tuned.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://tuned.com</link>
	<description>The all-in-one trading platform to create, automate, and monetize strategies.</description>
	<lastBuildDate>Thu, 05 May 2022 14:40:23 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.6.2</generator>
	<item>
		<title>Accumulation Bot &#8211; Our free DCA Bot!</title>
		<link>https://tuned.com/blog/learning/accumulation-bot-our-free-dca-bot/</link>
		
		<dc:creator><![CDATA[Dale Brown]]></dc:creator>
		<pubDate>Sat, 09 Apr 2022 21:16:12 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Trading]]></category>
		<category><![CDATA[Algorithmic Trading]]></category>
		<category><![CDATA[Technical Indicator]]></category>
		<category><![CDATA[DCA Bot]]></category>
		<category><![CDATA[Dollar Cost Averaging]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1717</guid>

					<description><![CDATA[Guacamole Bot - Our free DCA Bot! In this article we will explain how our free Dollar Cost Averaging script “Guacamole Bot” can be set up.]]></description>
										<content:encoded><![CDATA[
<p>A DCA (“Dollar Cost Averaging”) strategy is a method of investing into an asset at set intervals, whether that be time-based or price-based. The method of dollar cost averaging reduces investment risk but is also less likely to result in outsized returns. The Accumulation Bot is aimed at buying price-based set intervals. In other words, it’ll buy assets after a predefined drop in price. Buying the dip has never been this easy!<br>So lets get started with what dollar cost averaging is, and how to use our free DCA bot!<br></p>



<h2 class="wp-block-heading">Table of Contents</h2>



<ol class="wp-block-list"><li><a href="#what-is-it">What is Dollar Cost Averaging (&#8220;DCA&#8221;)?</a></li><li><a href="#getting-started">Getting Started with the Accumulation Bot</a></li><li><a href="#analysis">An in depth analysis of the settings</a></li><li><a href="#metrics-backtest">What to look for when Backtesting?</a></li><li><a href="#conclusion-live">It&#8217;s time to go Live!</a></li></ol>



<h2 class="wp-block-heading" id="what-is-it">What is Dollar Cost Averaging (“DCA”)?</h2>



<p>When you enter a position going all-in, you run the risk of entering the market when the asset is nearing its high, only to see the price tank and end up with a losing position. If this happens you will need to make a decision whether or not to hold, or sell the position at a loss.</p>



<p>When you DCA, you are dividing your investment entries into smaller segments and buying the chosen asset at various prices over time. This gives you a better average entry price for your position and increases the probability of closing a trade with a profit.</p>



<p>In this article we will explain how our free Dollar Cost Averaging script “Guacamole Bot” can be set up. Afterwards we will go into tips and tricks for testing and running the script. Lastly we’ll take a look at what you can expect in terms of performance, of course largely depending on the assets you choose to run.<br></p>



<h2 class="wp-block-heading" id="getting-started">Getting Started with the Accumulation Bot</h2>



<p>You can find the free Accumulation Bot via this <a href="https://app.tuned.com/scripts/community/39898">link</a>. Once you have opened the script you will see the ‘Script Preview’ on the bottom right hand side of the screen.</p>



<div class="wp-block-image is-style-default"><figure class="aligncenter size-full"><img fetchpriority="high" decoding="async" width="750" height="514" src="https://www.tuned.com/wp-content/uploads/2022/04/Script-Preview.png" alt="DCA Bot" class="wp-image-1869" srcset="https://tuned.com/wp-content/uploads/2022/04/Script-Preview.png 750w, https://tuned.com/wp-content/uploads/2022/04/Script-Preview-300x206.png 300w" sizes="(max-width: 750px) 100vw, 750px" /><figcaption>Script Preview &#8211; Guacamole Bot</figcaption></figure></div>



<p>You will need to fork the script to be able to use it. Click on the ‘Fork’ button, give it a name followed by clicking ‘Fork’.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" width="147" height="139" src="https://www.tuned.com/wp-content/uploads/2022/04/Fork-Button.png" alt="DCA Bot" class="wp-image-1870"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter size-full"><img decoding="async" width="366" height="291" src="https://www.tuned.com/wp-content/uploads/2022/04/Fork-Name-Fork.png" alt="Free DCA Bot" class="wp-image-1871" srcset="https://tuned.com/wp-content/uploads/2022/04/Fork-Name-Fork.png 366w, https://tuned.com/wp-content/uploads/2022/04/Fork-Name-Fork-300x239.png 300w" sizes="(max-width: 366px) 100vw, 366px" /></figure></div>



<p>This will save the script in your own personal library.<br>Once you have done this, you will be redirected to the ‘Script Editor’. Don’t worry, this may be daunting but you don’t actually need to write any code! On the right hand side of the screen you will see the script options that you are able to set to your likings. The default script settings are for preview purposes only.</p>



<p>However, in order for them to work, the bot needs to be properly configured. In the next section of this article we will be explaining in detail what each option does.</p>



<p>When you run a preview of the DCA bot you may be encountered with a few lines, and might ask what they are for?<br>In total there are 4 lines, 1 of which is optional.</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="560" height="394" src="https://www.tuned.com/wp-content/uploads/2022/04/4-lines.png" alt="Dollar Cost Averaging" class="wp-image-1874" srcset="https://tuned.com/wp-content/uploads/2022/04/4-lines.png 560w, https://tuned.com/wp-content/uploads/2022/04/4-lines-300x211.png 300w" sizes="(max-width: 560px) 100vw, 560px" /></figure></div>



<p>You will see a green line. This will be the “Take Profit” zone. If the price reaches this line, the position will be closed in profit.</p>



<p>Next up you will see a white line. This is the “Average Entry Price”, it is purely visual so you can see where the break-even price is.&nbsp;</p>



<p>Then there is the yellow line, this is the “% Price Drop”. Once a candle closes underneath this line, it will open an additional entry to lower your average entry price.</p>



<p>And last of all the optional red line. This is the “Stop Loss” zone. If you have a Stop Loss enabled, this will show up as a red line. As soon as price reaches this line, the position will be closed at a loss. Not all investment methodologies use stop-losses, e.g. Buy and Hold approaches, hence it being optional.</p>



<p>In general the Accumulation Bot will buy small amounts to lower your average entry price and reduce the risk during volatile moves. By doing so, the price doesn&#8217;t need to recover as much before you are back in profit.</p>



<div class="wp-block-image"><figure class="aligncenter size-large"><img loading="lazy" decoding="async" width="1024" height="485" src="https://www.tuned.com/wp-content/uploads/2022/04/Composer-Settings-1024x485.png" alt="DCA Bot Settings" class="wp-image-1876" srcset="https://tuned.com/wp-content/uploads/2022/04/Composer-Settings-1024x485.png 1024w, https://tuned.com/wp-content/uploads/2022/04/Composer-Settings-300x142.png 300w, https://tuned.com/wp-content/uploads/2022/04/Composer-Settings-768x364.png 768w, https://tuned.com/wp-content/uploads/2022/04/Composer-Settings-1536x728.png 1536w, https://tuned.com/wp-content/uploads/2022/04/Composer-Settings.png 1918w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure></div>



<h2 class="wp-block-heading" id="analysis">An in depth analysis of the settings</h2>



<h3 class="wp-block-heading"><strong>Buy at % Price Drop &#8211; (Max = 100.0)</strong></h3>



<p>This is one of the core features within the Accumulation Bot. What this means is that you will buy every ‘n’ percent that the asset&#8217;s price drops. For example, If your initial entry price was at $40,000 and you set your % Price Drop to 5%, Then your next entry will be at $38,000. (5% less than your previous entry)</p>



<h3 class="wp-block-heading"><strong>DCA Entry Increase Factor</strong></h3>



<p>The DCA Entry Increase Factor defines the intensity of your entries. What this means is that if your initial entry was $100 and you set the Increase Factor to 1.5, your next entry will be $150. This is a multiplication factor to help you quickly lower your average entry price every time you buy. Keep in mind: The higher this value is, the quicker your allocation will be saturated.</p>



<h3 class="wp-block-heading"><strong>Are DCA entries based on Average Entry Price?</strong></h3>



<p>If enabled, then the DCA entries that are made after the initial entry, will be based on the Average Entry Price. If disabled, then the DCA entries will be a fixed percentage based on the previous entry.</p>



<h3 class="wp-block-heading"><strong>Checkbox (A) &#8211; Initial entry based on a percentage of allocation used?</strong></h3>



<p>If enabled, then your initial entry will be a percentage of the total allocation assigned to the live run. For example, if you allocate $1500 to the script and enable this while having your Initial entry % set to 5%, your initial entry will be $75 (5% of $1500).</p>



<h3 class="wp-block-heading"><strong>Initial entry % (Max = 100.0) &#8211;&nbsp; (if Checkbox (A) = <img src="https://s.w.org/images/core/emoji/15.0.3/72x72/2611.png" alt="☑" class="wp-smiley" style="height: 1em; max-height: 1em;" />)</strong></h3>



<p>If Checkbox (A) is enabled this will set the percentage for your initial entry. If you allocate $5000 to the bot and set this to 10.0% then your initial entry will be $500 (10% of $5000).</p>



<h3 class="wp-block-heading"><strong>Initial entry quote value</strong></h3>



<p>If Checkbox (A) is disabled, then you can use this setting to force a fixed value (using the quote currency) as your initial entry. For example, if you set this to 200.0, then every initial entry will start with $200.</p>



<h3 class="wp-block-heading"><strong>Take Profit Percentage</strong></h3>



<p>This will be the percentage gained on your position at which you would like to close your position at, securing your gains. For example, if you set the Take Profit Percentage to 10%, and your average entry price is $5,000 as soon as the price reaches $5,500 you will close the position to lock in your profit.</p>



<h3 class="wp-block-heading"><strong>Use a Stop Loss Percentage?</strong></h3>



<p>This setting enables a Stop Loss. The Stop Loss is percentage based.</p>



<h3 class="wp-block-heading"><strong><strong>Stop Loss Percentage</strong></strong></h3>



<p>If the use of a Stop Loss is enabled, this is the value of which losing positions are closed. For example, a Stop Loss of 10% will close the position once the percentage loss of a position reaches -10%.<br></p>



<h2 class="wp-block-heading" id="metrics-backtest">What to look for when backtesting</h2>



<p>We’ve gone through the settings, what&#8217;s next?</p>



<p>Creating a <a href="https://www.tuned.com/blog/learning/strategy-creation/the-dangers-of-backtesting-how-to-avoid-overfitting-and-disappointment/">backtest</a>!</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="315" height="287" src="https://www.tuned.com/wp-content/uploads/2022/04/Backtest-Tab.png" alt="Backtest" class="wp-image-1877" srcset="https://tuned.com/wp-content/uploads/2022/04/Backtest-Tab.png 315w, https://tuned.com/wp-content/uploads/2022/04/Backtest-Tab-300x273.png 300w" sizes="(max-width: 315px) 100vw, 315px" /></figure></div>



<p>Within the terminal you can run backtests, these will allow you to test your strategy on historical data. This can show you how the settings could impact the profitability of the Accumulation Bot. However, what metrics are important to pay attention to?<br>While everyone has a different risk appetite, there are some general guidelines that could be followed in order to reduce potential losses and increase the chance to make a profit.</p>



<p>Some of the important metrics to look out for are:</p>



<ol class="wp-block-list"><li>Max Drawdown</li><li>Profitable Trades</li><li>Average Monthly Profit</li><li>Consistency Score</li></ol>



<p>Finding a Max Drawdown that fits your risk profile can be difficult, but when it comes to using a DCA bot, generally speaking, you’ll want to find something that beats the drawdown of the market.</p>



<p>A general guideline would be a Max Drawdown of no lower than -20%, however if you feel like taking more risk, you can go beyond this. Higher risk can equate to higher reward but also higher losses should they occur.</p>



<p>The percentage of profitable trades is also very important. The higher this percentage is, the lower the chances of executing losing trades becomes. Imagine you executed 4 trades, 3 of them profitable and 1 of them loss making, in this case your profitable trades % would be 75%. The higher this number gets, the better the win/lose ratio gets in your favour. Don’t be discouraged, a low % of profitable trades can be offset with strict risk management and high R/R (“Risk to Return”) of each individual trade.</p>



<p>Average Monthly Profit. While we all want to see 100% monthly gains, we know that it&#8217;s not realistic unless extreme risk is taken. With the <meta charset="utf-8">Accumulation Bot the aim is to find a consistent average monthly profit. The risk you take will have an impact on this number.</p>



<p>Now for the fun part, the Consistency Score. This metric has been developed by the Tuned team to assess the consistency of returns. A consistency score of 100 would be the best possible score a strategy can have, though this is highly unlikely. Aiming for a score that is higher than 65 would already be a good start. The higher this number, the more consistent the strategy may perform.</p>



<p>During a bear market a DCA bot can outperform the Buy and Hold percentage by averaging into a trade, and getting out at the first best relief rally to lock in the profits. During this time the strategy will perform better than the Buy and Hold strategy. The biggest challenge is finding out how quickly to buy in during a drop, you don’t want to be stuck in a coin for too long and miss out on opportunities. If you saturate your allocation too quickly, it could be that you can’t exit with a profit on the next rally.&nbsp;</p>



<p>During a bull market the DCA bot will typically fall behind compared to the Buy and Hold approach. The reason for this is that the DCA bot typically enters with a small percentage of your allocation, and only increases the position when the market is going down. If the asset&#8217;s price is only increasing, you will not have a large exposure to benefit from, and will underperform versus the market. You can increase your initial entry % to compensate for this. However, this does put you at risk of saturating your funds faster during a bear market! It’s a balancing act to find settings that will work long term.</p>



<h2 class="wp-block-heading" id="conclusion-live">It’s time to go live!</h2>



<p>Once you have found settings that suit your risk and returns profile it&#8217;s time to hit the button and start a live DCA bot!</p>



<p>Before doing this you will need to connect an API key. Guides on how to do this can be found here. <a href="https://tuned.zendesk.com/hc/en-us/sections/360004075299-Connecting-to-Exchanges-and-Exchange-Configurations">Connecting to Exchanges and Exchange Configurations – Tuned Systems Inc</a>&nbsp;</p>



<p>Once your API key has been added you can just open up the script, put in your preferred settings, click on the ‘live’ tab, and hit ‘Go Live’!</p>



<div class="wp-block-image"><figure class="aligncenter size-full"><img loading="lazy" decoding="async" width="312" height="909" src="https://www.tuned.com/wp-content/uploads/2022/04/Going-Live.png" alt="Going Live" class="wp-image-1886" srcset="https://tuned.com/wp-content/uploads/2022/04/Going-Live.png 312w, https://tuned.com/wp-content/uploads/2022/04/Going-Live-103x300.png 103w" sizes="(max-width: 312px) 100vw, 312px" /></figure></div>



<p class="has-text-align-right">Disclaimer :- The settings shown in this article are for educational purposes only!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What is the Arnaud Legoux Moving Average and how to use it on Tuned?</title>
		<link>https://tuned.com/blog/learning/strategy-creation/what-is-the-arnaud-legoux-moving-average-and-how-to-use-it-on-tuned/</link>
		
		<dc:creator><![CDATA[Fabian Loureiro]]></dc:creator>
		<pubDate>Fri, 18 Mar 2022 17:05:12 +0000</pubDate>
				<category><![CDATA[Strategy Creation]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Technical Indicator]]></category>
		<category><![CDATA[indicator]]></category>
		<category><![CDATA[ALMA]]></category>
		<category><![CDATA[Arnaud Legoux Moving Average]]></category>
		<category><![CDATA[Moving Average]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1677</guid>

					<description><![CDATA[In this article, we’ll be exploring what the Arnaud Legoux Moving Average (ALMA) indicator is, what it measures, common uses, and how it can be applied to Tuned and algorithmic trading in general.
]]></description>
										<content:encoded><![CDATA[
<p>In this article, we’ll be exploring what the Arnaud Legoux Moving Average (ALMA) indicator is, what it measures, common uses, and how it can be applied to Tuned and algorithmic trading in general.<br><br></p>



<h2 class="wp-block-heading">Table of contents</h2>



<ol class="wp-block-list"><li><a href="#1">What is the ALMA indicator?</a></li><li><a href="#2">How is the ALMA calculated?</a></li><li><a href="#3">Common uses</a></li><li><a href="#4">An example strategy using ALMA in Tuned</a></li><li><a href="#5">Conclusion</a><br><br></li></ol>



<h2 class="wp-block-heading" id="1">What is the ALMA indicator?</h2>



<p>As the name suggests, the ALMA indicator is a moving average (MA) variant and was created by Arnaud Legoux in 2009. The goal was to decrease the lag commonly encountered with moving averages.</p>



<p>As with most moving averages, this indicator aims to detect trends and trend reversals. It works similarly to other moving averages, but one of the main differentiators is that it calculates 2 moving averages, one from left to right and one from right to left. This output is then further processed through a customizable formula, for either increased smoothness or increased responsiveness.</p>



<p class="has-no-margin-bottom">Because of its similarity to a moving average, you’ll notice the applications are also similar.</p>



<ul class="wp-block-list"><li>Applying 2 ALMAs with different lengths can provide signals when they cross;</li><li>Crosses between the price and an ALMA can provide signals;</li><li>Combining any of the above with conditions derived from other indicators.</li></ul>



<h2 class="wp-block-heading" id="2">How is the ALMA calculated?</h2>



<p class="has-no-margin-bottom">To explain the formula there are 3 variables to consider:</p>



<p><strong>Window:</strong> Also referred to as size or lookback, it represents the amount of price data we will use. The default value is 9, which means we will look at the previous 9 candles.</p>



<p><strong>Offset:</strong> A multiplier that determines the indicator’s alignment to price. The default value is 0.85 but can range in decimals from 1 to 0. An offset of 1 will make the indicator follow the price exactly while something closer to 0 introduces more lag.</p>



<p><strong>Sigma:</strong> Not to be confused with the Greek letter for summation, this represents the filter’s range. The default value is 6, and lower values will make the ALMA indicator less reactive to price changes.</p>



<p>The formula for calculating the ALMA is the following:</p>



<p><img loading="lazy" decoding="async" src="https://lh3.googleusercontent.com/TZqJCKgKZkK6Ee23PDjress-O7ltnFBUCa2mmVuzfGRPVFCWajWun29IzSNP35D75RYE_VmEqKZalRz34a9-fpQau30YzIW63bguMQmUWkGgGqEvQTpghZSY5cno81d_HCUGX9I4" width="435" height="131"></p>



<p>We use our input series (source/price data), weights determined by our offset, and width determined by sigma. Together these form a weighted sum based on our window (size/lookback), and the process repeats for the next candle.</p>



<h2 class="wp-block-heading" id="3">Common uses</h2>



<p>The ALMA was created with the goal of reducing the price lag usually associated with moving averages. As with most MAs, the Arnaud Legoux Moving Average is used to follow trends and detect trend reversals in price. In short, the ALMA helps you:</p>



<ul class="wp-block-list"><li>Identify trends;</li><li>Identify reversals in trends;</li><li>Find confluence with other technical indicators.</li></ul>



<h2 class="wp-block-heading" id="4">An example strategy using ALMA in Tuned</h2>



<p><img decoding="async" src="https://lh6.googleusercontent.com/OcT_VtDrf0sFKNaFQZ7x6MY_ujtqoYO-C8t4FyUHnHf06chqYJSutT0u8Ii8epwmg9jLHzlIhBKFn9WM5sayycQuyMk6nvKAE284XIktDY7Wm4M3EsioOkHKirr0hLx3z38FdGGe" style="width: 769px;"></p>



<p>The code is as follows:</p>



<h3 class="wp-block-heading">Tuned Script</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;sup>//Inputs
Length = intInput("Length Fast ALMA",13)
Offset = numInput("Offset Fast ALMA",0.01)
Sigma = numInput("Sigma Fast ALMA",4.5)
Length2 = intInput("Length Medium ALMA",11)
Offset2 = numInput("Offset Medium ALMA",0.01)
Sigma2 = numInput("Sigma Medium ALMA",1.5)
Length3 = intInput("Length Slow ALMA",66)
Offset3 = numInput("Offset Slow ALMA",0.01)
Sigma3 = numInput("Sigma Slow ALMA",3.5)
 
//indicator
FastALMA = alma(close, Length, Offset, Sigma)
MediumALMA = alma(close, Length2, Offset2, Sigma2)
SlowALMA = alma(close, Length3, Offset3, Sigma3)
 
//Conditions
buy = and(crossover(FastALMA, MediumALMA), gt(SlowALMA, MediumALMA))
sell = and(crossunder(FastALMA, MediumALMA), lt(SlowALMA, MediumALMA))
clsBuy = and(position_long, crossover(MediumALMA, FastALMA))
clsSell = and(position_short, crossunder(MediumALMA, FastALMA))
 
//Plot
plot(FastALMA, "Short", "#11D12B", 2)
plot(MediumALMA, "Short", "#BB11D1", 2)
plot(SlowALMA, "Short", "#1114D1", 2)
//Signal Push
out(signalIf(buy, sell, clsBuy, clsSell))&lt;/sup></pre>



<p><a href="https://app.tuned.com/scripts/community/38555">Click here to add this script to your account.</a></p>



<h3 class="wp-block-heading">Pine Alpha</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;sup>//@version=4
//Tuned supports Pine Version 4 Only
strategy(title="Arnaud Legoux Moving Average", overlay = true)
 
//Inputs
Length = input(title = "Length Fast ALMA", defval = 13)
Offset = input(title = "Offset Fast ALMA", defval = 0.01)
Sigma = input(title = "Sigma Fast ALMA", defval = 4.5)
Length1 = input(title = "Length Medium ALMA", defval = 11)
Offset1 = input(title = "Offset Medium ALMA", defval = 0.01)
Sigma1 = input(title = "Sigma Medium ALMA", defval = 1.5)
Length2 = input(title = "Length Slow ALMA", defval = 66)
Offset2 = input(title = "Offset Slow ALMA", defval = 0.01)
Sigma2 = input(title = "Sigma Slow ALMA", defval = 3.5)
 
//indicator
FastALMA = alma(close, Length, Offset, Sigma)
MediumALMA  = alma(close, Length1, Offset1, Sigma1)
SlowALMA = alma(close, Length2, Offset2, Sigma2)
 
//Conditions
buy = crossover(FastALMA, MediumALMA) and SlowALMA > MediumALMA
sell = crossunder(FastALMA, MediumALMA) and SlowALMA &lt; MediumALMA
clsBuy = strategy.long and crossover(MediumALMA, FastALMA)
clsSell = strategy.short and crossunder(MediumALMA, FastALMA)
 
//Plot
plot(FastALMA, title = "Short", #11D12B, 2)
plot(MediumALMA, title = "Long", #BB11D1, 2)
plot(SlowALMA, title = "Long", #1114D1, 2)
 
//Signal Push
strategy.order("long", strategy.long, when = buy) 
strategy.order("short", strategy.short, when = sell)
strategy.close("long", strategy.long, when = clsBuy) 
strategy.close("short", strategy.short, when = clsSell)&lt;/sup></pre>



<p> <a href="https://app.tuned.com/scripts/community/38556">Click here to add this script to your account.</a> </p>



<p>For demonstration purposes, a strategy was coded with the following parameters:</p>



<ul class="wp-block-list"><li>3 ALMAs</li><li>Fast ALMA (Length &#8211; 13; Offset &#8211; 0.01; Sigma &#8211; 4.5)</li><li>Medium ALMA (Length &#8211; 11; Offset &#8211; 0.01; Sigma &#8211; 1.5)</li><li>Slow ALMA (Length &#8211; 66; Offset &#8211; 0.01; Sigma &#8211; 3.5)</li><li>Stop Loss = 7%<br></li></ul>



<p>Strategy conditions:</p>



<ul class="wp-block-list"><li>Long when Fast ALMA crosses over Medium ALMA</li><li>Short when Fast ALMA crosses under Medium ALMA</li><li>Slow ALMA must be above Medium ALMA to long</li><li>Slow ALMA must be below Medium ALMA to short</li><li>Close Long when Medium ALMA crosses over Fast ALMA</li><li>Close Short when Medium ALMA crosses under Fast ALMA</li></ul>



<p>Using the crosses of 2 MAs to generate signals is not a new concept in trading. The challenge is filtering excessive signals during indecisive markets. One method is a combination of 3 ALMAs with different lengths that can provide better performance by comparing short, medium and long timeframe trends found in different time periods. The 3rd ALMA allows signals to be filtered relative to it, like a 200 period moving average. In our example, it provides an insight into the longer trend. This allows us to confirm uptrends and reversals with higher confidence by finding confluence in multiple timeframes.&nbsp;</p>



<h3 class="wp-block-heading">How does it behave?</h3>



<ul class="wp-block-list"><li>In sideways markets, this strategy is prone to whipsaws, triggering too many signals. A volatility filter is a good option to help in these scenarios.</li><li>In trending markets, this strategy can produce profitable trades by following the trend. We found timeframes equal to or higher than 30min to produce better results.</li></ul>



<p><img decoding="async" src="https://lh3.googleusercontent.com/DWfzKyEZkJxQm8qMNFGUVL9BNfzW38UV_6uL6xAbYcrjdmnF5lAsSsn8OQIOrcdaoDN2s-HztwuBQUGCDRNZbOC5LO1n0dw52Ig_DqnCEzH6A1RRPu0AK7fftr7PdUDeeo24aJIx" style="width: 769px;"></p>



<h2 class="wp-block-heading" id="5">Conclusion</h2>



<p>One of the main advantages of the Arnaud Legoux Moving Average, when compared to other Moving Averages, is the degree of customization it provides, this is especially relevant in algorithmic trading and allows us to leverage Tuned’s batch testing functionality to test thousands, even millions of settings and see how they perform on historical data. As with most trend following strategies, drawdowns must be considered during its inception. Time between equity peaks might be extended if no clear trends are set. We recommend forward testing to verify the performance achieved on historical data.<br>The script and settings provided above should only be used for educational purposes, we highly recommend experimenting with multiple indicators and improving upon the example provided above.</p>



<p></p>



<p class="has-text-align-right">Have fun scripting!<br><br><br></p>



			<div class="wp-block-uagb-post-grid uagb-post-grid  uagb-post__image-position-background uagb-post__image-enabled uagb-block-1ccbfdc7     uagb-post__items uagb-post__columns-2 is-grid uagb-post__columns-tablet-2 uagb-post__columns-mobile-1 uagb-post__equal-height" data-total="6" style="">

												<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/price-action-series-chapter-4-time-frames-confluence/" target="_self" rel="bookmark noopener noreferrer">Price Action Series Chapter 4 &#8211; Time Frames Confluence</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-02-19T13:07:09-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					February 19, 2022				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>In today’s price action post, we will cover time frames, the importance of confluence between&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/price-action-series-chapter-4-time-frames-confluence/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
							</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/what-is-the-williams-percent-range-indicator-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer">What is the Williams %R indicator and how to use it on Tuned?</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-02-09T14:35:00-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					February 9, 2022				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					We&#8217;ll be talking about the Williams %R indicator in this article.

We will look at what&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/what-is-the-williams-percent-range-indicator-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/what-is-the-williams-percent-range-indicator-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer"><img loading="lazy" decoding="async" width="300" height="133" src="https://tuned.com/wp-content/uploads/2022/02/ss1-300x133.png" class="attachment-medium size-medium" alt="Williams %R" srcset="https://tuned.com/wp-content/uploads/2022/02/ss1-300x133.png 300w, https://tuned.com/wp-content/uploads/2022/02/ss1-1024x452.png 1024w, https://tuned.com/wp-content/uploads/2022/02/ss1-768x339.png 768w, https://tuned.com/wp-content/uploads/2022/02/ss1-1536x679.png 1536w, https://tuned.com/wp-content/uploads/2022/02/ss1.png 1557w" sizes="(max-width: 300px) 100vw, 300px" />					</a>
									</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/" target="_self" rel="bookmark noopener noreferrer">The No-Code Strategy Template by Tuned</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-02-04T16:58:49-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					February 4, 2022				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>Out of 50,000 trading bots there’s a strong chance at least one is profitable. In&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/" target="_self" rel="bookmark noopener noreferrer"><img loading="lazy" decoding="async" width="300" height="194" src="https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail-300x194.png" class="attachment-medium size-medium" alt="" srcset="https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail-300x194.png 300w, https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail-768x497.png 768w, https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail.png 813w" sizes="(max-width: 300px) 100vw, 300px" />					</a>
									</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/what-is-the-on-balance-volume-indicator-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer">What is the On-Balance Volume indicator and how to use it on Tuned?</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-01-30T11:34:45-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					January 30, 2022				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					In this article, we’ll be exploring what the On-Balance Volume (OBV) indicator is, what it&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/what-is-the-on-balance-volume-indicator-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/what-is-the-on-balance-volume-indicator-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer"><img loading="lazy" decoding="async" width="300" height="148" src="https://tuned.com/wp-content/uploads/2022/01/OBV-300x148.png" class="attachment-medium size-medium" alt="" srcset="https://tuned.com/wp-content/uploads/2022/01/OBV-300x148.png 300w, https://tuned.com/wp-content/uploads/2022/01/OBV-1024x506.png 1024w, https://tuned.com/wp-content/uploads/2022/01/OBV-768x380.png 768w, https://tuned.com/wp-content/uploads/2022/01/OBV-1536x759.png 1536w, https://tuned.com/wp-content/uploads/2022/01/OBV.png 1550w" sizes="(max-width: 300px) 100vw, 300px" />					</a>
									</div>
			
									</article>
											</div>
			]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Price Action Series Chapter 6 – Market Conditions</title>
		<link>https://tuned.com/blog/learning/price-action-series-chapter-6-market-conditions/</link>
		
		<dc:creator><![CDATA[Simao Ferreira]]></dc:creator>
		<pubDate>Mon, 07 Mar 2022 17:32:00 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Price Action Series]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1567</guid>

					<description><![CDATA[In this chapter of the price action series, we will cover the different market conditions of an asset. We will also cover how to approach these conditions If you missed out on the other chapters you can follow the links below: 1: Price Action Series 2: Support and Resistance&#160; 3: Plot Support and Resistances&#160; 4:&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In this chapter of the price action series, we will cover the different market conditions of an asset. We will also cover how to approach these conditions</p>



<p>If you missed out on the other chapters you can follow the links below:</p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">1: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">2: Support and Resistance</a>&nbsp;</p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-3-plot-support-resistance/">3: Plot Support and Resistances&nbsp;</a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-4-time-frames-confluence/">4: Time-Frames</a></p>



<p><a href="https://www.tuned.com/blog/uncategorized/price-action-series-chapter-5-candles/">5: Candle Formations</a></p>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">Different Market Conditions</h3>



<figure class="wp-block-image"><img decoding="async" src="https://lh5.googleusercontent.com/tWTy5klI_Ayi1sfh4vbMZZju2hKqaZXMc0HllkfngSMPaQxLpa_bZBy9Zjtg0EjHNX8HULlx4dRF7TXyPuuBqEjbGo-tw9K2RVSn-i16_lWJaFh0hKaGr7-srnJsO3vpTd3vtjsb" alt="market conditions" title="market conditions"/></figure>



<p>Market conditions can be divided into 2 branches: sideways, the red area, and trending, the green area.</p>



<h3 class="wp-block-heading">Trending Markets</h3>



<p>A trending market can be trending up or down and is defined by making higher highs and higher lows (trending up) or lower highs and lower lows (trending down). Trending markets also can be defined by their strength, strong trend, and weaker trends. Nevertheless, we need to be aware that on heavily trending markets we need to be very careful when trying to trade against the trend. </p>



<p>A simple way to classify a strong trend is by a significant move in the price alongside heavy volume. If we are in a strong trend, the price might initially stall at support and resistance zones but then proceed to break right through. This is why we need to take precautions and need an even greater amount of confirmation if we decide to trade against the dominant trend. In heavily trending markets, it’s often safer to trade in the direction of the dominant trend, not against it.</p>



<h3 class="wp-block-heading">Ranging Markets</h3>



<p>In a ranging market, both long and short positions are effective as neither bulls nor bears are in control of the dominant trend.</p>



<h3 class="wp-block-heading">Side note for Futures Markets</h3>



<p>Trading long is betting that the price will increase and trading short is betting that the price will decrease. These definitions are used in futures trading. On the Spot market, the analogy with long and short can be made with buy to bet on a price increase and selling with the intent to secure gains, and/or aiming to buy back at a lower price to increase your amount of coins.</p>



<h3 class="wp-block-heading">To recap</h3>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/-CmhFoFurN4qBlNCz1xJUUZUtypO64ni3gOG65Psw56pyVYRh5IItHgDw1IriDMfp2OVrdFry3x7rmdir4TlZVoP70JvzUeOScEcoP6FYELO2U9v9KU81EhaW3c-zkFL5W3adHv7" alt="market conditions" title="market conditions"/></figure>



<p>If we have a bearish or bullish bias on the monthly or weekly, we want the daily to &#8220;tell&#8221; us the same bullish or bearish bias that we have on the higher time frames. The other way is by candle formations which were covered in the last <a href="https://www.tuned.com/blog/uncategorized/price-action-series-chapter-5-candles/">chapter</a>. Just know that we can use candle wicks to help predict future movement. Longer wicks, for example, are an indication that the price is indeed reacting to the support and resistance levels.</p>



<p>In the next chapter, we will dig into trend lines and some useful indicators that can be used on price action strategies. Last but not least we will explain the importance of using a proper money management technique and how we can apply that in Tuned.</p>



<p>Stay Tuned!</p>



<p>If you missed the other chapters follow the links: </p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">1st: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">2nd: Support and Resistance&nbsp;</a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-3-plot-support-resistance/">3rd: Plot Support and Resistances&nbsp;</a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-4-time-frames-confluence/">4th: Time Frames Confluence</a></p>



<p><a href="https://www.tuned.com/blog/uncategorized/price-action-series-chapter-5-candles/">5th: Candle Formations</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Price Action Series Chapter 5 &#8211; Candles</title>
		<link>https://tuned.com/blog/uncategorized/price-action-series-chapter-5-candles/</link>
		
		<dc:creator><![CDATA[Simao Ferreira]]></dc:creator>
		<pubDate>Thu, 03 Mar 2022 16:06:46 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1563</guid>

					<description><![CDATA[In today’s price action post we will cover candles and candle formations. It&#8217;s important to understand how candles are formed and the typical candle formations used in a price action trading style.&#160; If you missed out on the other chapters you can follow the links below: 1: Price Action Series 2: Support and Resistance  3:&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In today’s price action post we will cover candles and candle formations. It&#8217;s important to understand how candles are formed and the typical candle formations used in a price action trading style.&nbsp;</p>



<p>If you missed out on the other chapters you can follow the links below:</p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">1: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">2: Support and Resistance</a> </p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-3-plot-support-resistance/">3: Plot Support and Resistances </a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-4-time-frames-confluence/">4: Time-Frames</a></p>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading">The Candles</h3>



<p class="has-text-align-left">Candles are divided by into their body and the sticks, also called wicks or shadows. We can say that the stick tells a story while the body is reflected the facts of the market… Exploring this concept a little more, we can say that the open and the close of a candle are the facts: the fact is that the price opened and closed at that value. We can say that the wicks tell us the story of the market during a specific time frame. This in a way shows us what all the market participants did in order to reach the candle close level. For example, a long wick can tell us the story of many market participants buying or selling at a certain level printing the wick.</p>



<p class="has-text-align-center"><br><img loading="lazy" decoding="async" width="226" height="220" src="https://lh6.googleusercontent.com/6iy5H7s3rWqrkeJt1WYXy-yuxPPOiKHkrBIHd_lfkSKbvIOMEs7u1IE8zTxVcBhjuGPVZUsGujxXf5nitoLzXiAFL8W3b7jENPOxLlZn-AOXXL3Ttl770EQtmm4KTat0tceeuTOr"></p>



<h3 class="wp-block-heading">Candle Patterns</h3>



<p>We will focus on only 2 kinds of candles, candles with long wicks, and the momentum/engulfing candles pattern. But first let&#8217;s get this concept deep in our minds, wicks tell a story while the body is the facts of the market!</p>



<ul class="wp-block-list"><li>On candles with long wicks, you can say ‘the longer the better. These candles show how the buyers or sellers tried to push the price higher or lower but failed which causes a long wick to form.</li></ul>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://lh3.googleusercontent.com/loqIa0WFaZbSOLWQ-HrSR_lUR2bEhySMbDiFd3UpyLzkDyd8Ki5JAAwmlEzT29ndXL-VZ_YViE4DWdSjTZEgiV89XRK0ltceNaUJU00qtB1IdjppQLdN7-7IZN7-0xc-hr0gVstc" alt="candle" title="candle"/></figure></div>



<ul class="wp-block-list"><li>On momentum/engulfing candles, the body of the candle is a lot larger than the wick and could even not have a wick. These candles show us the strength of buyers or sellers that are in control of the market at that time.</li></ul>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://lh6.googleusercontent.com/FiklGzi-9Pu6-h7QjTlw8RVnSa4HuEmQ8DJuEpqKh0Y5GbvRQv8U9Tw5lsd8YtwylquHXy1f0bbGon-qQcBO4l3mrbghZNIRBC-9eIJJmgJh1S4S6Vk7pkVPtoY2hBpYEkmQN8zD" alt="candles" title="candles"/></figure></div>



<p>We can use candle patterns in combination with support and resistance zones as part of a trading strategy. Using the long wick candle approach, if we have multiple candles that are rejecting an area, this shows us that the price tried over and over again to break but failed to pass. On the other hand, there is the analogy of the stone on the lake. When you throw a stone to skip across a still pond, the first time the stone touches the water it almost jumps back up, the second time it bounces with less force, very often on the third or fourth time it touches the water it’s less likely to jump but will instead fall into the lake. Sometimes we see this in markets. The more support or resistance is tested, the greater the chance of price breaking through. Like our skipping stone falling into the water.</p>



<h3 class="wp-block-heading">Some Examples:</h3>



<figure class="wp-block-image"><img decoding="async" src="https://lh5.googleusercontent.com/Jv4bFWw8InVK7JkkULfSIipP9xOC96Ne0Va4VQKjsgsed4WuGV1Kot8Ye1DJKxl6DKCgnCbUUsknKs7euV-oxSmpzyXoH-bKtWz1FCERPTC8DQE1Tt5hK4Orf2-lXhjqDuRWB_te" alt="candles" title="Candle Patterns"/></figure>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://lh6.googleusercontent.com/jFGnCBRObHaS95qxyIy-z1bUkirSTDbZeZRcz6MQhn8gcDPS2Z5EVoLLoYvQ9MYHG5i3ebQep_O2Fzy8mFsaYQ-28WDfuyA_dwlYogIsY3qYA3UL0J-hWUgO6F7oNgcgczRntNw4" alt="candles" title="Candle Patterns"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://lh3.googleusercontent.com/JfgJW267dj6Qy13vBK7UJybShF7VWi3npMA0XPmRSs4pbrKpLBJKU-q4zumVdxwOClL3x_zT0O-4ZvjA4utNKPma-GC1z8qyXt7NIEa0FXSu79J5ud4wbd61Q-jz6vAfYMnycSL5" alt="candles" title="Candle Patterns"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://lh6.googleusercontent.com/rR8ssS2b8eMpKztb-4LYaL0mj_1qGS2Y4pz-Kt5vAJQK_hrxXKbBlF0zzfmi1iSMUkFoDGPo9WaaIJw_n6TPWxSUhlAR9LyoGWiTR16fHeTF5hYR4AWeyWRwBhJKOSWxDrttujTw" alt="candles" title="Candle Patterns"/></figure></div>



<p>Learn more about using engulfing and Doji candle patterns on Tuned by following this <a href="https://app.tuned.com/editor/25842">link</a> and this <a href="https://app.tuned.com/editor/25845">link</a> where you&#8217;ll find a demo script.</p>



<p>In this chapter, we have looked at the importance of candles and their formations. We also investigated the importance of using candle patterns near the support and resistance areas when building a strategy based on price action.</p>



<p>In the next chapter (Chapter 6) we will cover the different market conditions (trending and ranging)</p>



<p>Stay Tuned!</p>



<p>If you missed the other chapters follow the links: </p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">1st: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">2nd: Support and Resistance&nbsp;</a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-3-plot-support-resistance/">3rd: Plot Support and Resistances </a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-4-time-frames-confluence/">4th: Time Frames Confluence</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Price Action Series Chapter 4 &#8211; Time Frames Confluence</title>
		<link>https://tuned.com/blog/learning/strategy-creation/price-action-series-chapter-4-time-frames-confluence/</link>
		
		<dc:creator><![CDATA[Simao Ferreira]]></dc:creator>
		<pubDate>Sat, 19 Feb 2022 20:07:09 +0000</pubDate>
				<category><![CDATA[Strategy Creation]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Price Action Series]]></category>
		<category><![CDATA[Price action]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1485</guid>

					<description><![CDATA[In today’s price action post, we will cover time frames, the importance of confluence between time frames, and candle patterns (covered in chapter 5). There will be a brief study about trading entries and we will share a candle pattern script (in chapter 5). If you miss the other chapters you can follow the link:&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In today’s price action post, we will cover time frames, the importance of confluence between time frames, and candle patterns (covered in chapter 5). There will be a brief study about trading entries and we will share a candle pattern script (in chapter 5).</p>



<p>If you miss the other chapters you can follow the link:</p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">1st: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">2nd: Support and Resistance&nbsp;</a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-3-plot-support-resistance/">3rd: Plot Support and Resistances&nbsp;</a></p>



<hr class="wp-block-separator"/>



<p>In this chapter, we&#8217;ll focus on multiple time frames and the different opportunities markets present us by using higher time frames in combination with lower time frames.</p>



<p>Higher time frames such as monthly and weekly candles provide an easier way of finding more reliable support and resistance areas. A good way of removing the noise of the market can be simply zooming out.</p>



<p>Accurate dynamic support and resistance zones on monthly and weekly time frames are areas that stick out and are very obvious to spot. Higher time frames provide us with a clearer image of the market state by filtering small and mostly, irrelevant price movements. Last but not least, using these higher time frames we are filtering out in some cases, short term emotional market moves.</p>



<p>As mentioned in the previous article, easily visible levels usually hold more weight. The logic is that the larger the number of traders who find these levels, the stronger the reaction and volume when price approaches them.</p>



<h3 class="wp-block-heading">Different Time Frames</h3>



<p>When we are using lower time frames such as 4 hours, 1 hour, or even below, there are support and resistance zones everywhere! One of the major downsides of lower time frames is the abundance of apparent support and resistance zones, which are often market noise. Contrarily, on higher time frames there is way less noise and the support and resistance areas become more obvious to spot. Spotting these areas on the higher time frames increases the probability of finding a true support and resistance zone. Finding a true support and resistance zone opens opportunity, and is the first step to find a trade entry on a price action-based strategy. The trading entry will occur if we have a confirmation and a strategy inside a dynamic support and resistance zone:</p>



<p>&nbsp;<img src="https://s.w.org/images/core/emoji/15.0.3/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> <strong>Dynamic Support/Resistance Zone + Confirmation + Strategy = Trade Entry</strong></p>



<p>We can break down the trade entry into 3 steps:</p>



<ol class="wp-block-list"><li>Find key dynamic support and resistance zones</li><li>Once the price gets into these key zones we need confirmation, meaning, price action telling us what it wants to do next. Meaning, when the price gets to these zones it can go up, down, or sideways&#8230; We need confirmation on what the price &#8220;wants to do&#8221;. We don&#8217;t enter a trade just because we reach a support/resistance zone.</li><li>Use additional logic, like a technical indicator, to provide trade entries. By researching through trial and error we can spot edges.</li></ol>



<hr class="wp-block-separator"/>



<h3 class="wp-block-heading"><strong>Time Frame Confluence:</strong></h3>



<p>There are many ways of spotting a confirmation as mentioned above. One effective way is through time frame confluence, in other words, multiple time frames should express the same bias.</p>



<p>Analyzing multiple time frames, such as monthly, weekly, and daily should paint the same image, be it a bearish or bullish sentiment. Another way is via candle formations, which we&#8217;ll cover in the next chapter.</p>



<h3 class="wp-block-heading"><strong>Time Frame confluences examples:</strong></h3>



<p><strong>Weekly Candles</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://lh3.googleusercontent.com/v-q6nMba9_IwaqbamWei1DHIOj0bn1WSR3z6nYYfLajD8rhEZ208-kBcOavT9L7Nn9QuL47qOceQ0pQp5x-HyxCt4mSxzA0LHuw9QgKE7j0httMhBb_uyxCEZUr7N9AegL4EacAV" alt="Multiple Rejections Weekly" title="Weekly Time-Frame"/></figure>



<p><strong>Daily Candles</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/C6CbracSexakQw_gWTZ4lYkFWxbrnhqPbIZ3cT-uywJ5mG2rgDfTmdX8_Wb4Fom9deCrkOc2aO3zuxteknPIBUsVwxrHwsKjdN81MTqOpa1FhJBBwY9WGLFXocpyI1QmEsRBwGle" alt="Daily Time-Frame" title="Multiple Rejections Daily"/></figure>



<p><strong>8H Candles</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/esK8be6AqeGx_6_rMj5rmLo2r3NE_nGeG7Lpg9Iu1LRMEYjpiFLhJio1uDO6XUD5j5FmWf7YKhWx1ScfbWbGNA_hfTqWNjyUeWbu4Z6o8hPnnATADVI_ezSAKxyAncFM3inAJCl6" alt="Multiple Rejections" title="8H Time Frame"/></figure>



<p><strong>4H Candles</strong></p>



<figure class="wp-block-image"><img decoding="async" src="https://lh4.googleusercontent.com/g8mKvydVyvlCZTsbxIZQe2KTAULf1zpRzAEKcE3EfO3dO8NR0dolQtSKcZUtI8Y6MShEXh0JBjM1bWjmggcZy8I4KYKSJq6C36EbqmKVki2KJEDbsEbrPUbHRizYKSA7TxvWdlIy" alt="Multiple Rejections 4H" title="4H Time Frame"/></figure>



<p>As we can see above, we can see time frame confluence from the weekly until the 4H, giving us a huge Bullish bias. Having a bullish bias doesn&#8217;t mean that we can enter the market, let&#8217;s make a small reminder on the entry rules:</p>



<p><strong>Dynamic Support/Resistance Zone + Confirmation + Strategy = Trade Entry</strong></p>



<p>In <a href="https://www.tuned.com/blog/uncategorized/price-action-series-chapter-5-candles/">chapter 5</a>, we will cover ways to determine confirmations and start to build a strategy based on price action. We will also cover the different market conditions we can encounter on tradable assets (Chapter 6).</p>



<p>Stay Tuned!</p>



<p>If you missed the other chapters follow the links:</p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">1st: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">2nd: Support and Resistance&nbsp;</a></p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-3-plot-support-resistance/">3rd: Plot Support and Resistances&nbsp;</a></p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Face the Bear &#8211; How to profit from downtrends</title>
		<link>https://tuned.com/blog/learning/face-the-bear-how-to-profit-from-downtrends/</link>
		
		<dc:creator><![CDATA[Fabian Loureiro]]></dc:creator>
		<pubDate>Mon, 14 Feb 2022 19:05:56 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Bear market]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1453</guid>

					<description><![CDATA[Every financial market goes through different cycles, commonly known as bear and bull markets. A bull market is characterized as an uptrend with higher highs and higher lows, while a bear market trends down with lower highs and lower lows. Investors enjoy the profitable periods of a bull market, but often assume bear markets are&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Every financial market goes through different cycles, commonly known as <em>bear</em> and <em>bull </em>markets. A bull market is characterized as an uptrend with higher highs and higher lows, while a bear market trends down with lower highs and lower lows. Investors enjoy the profitable periods of a bull market, but often assume bear markets are bad. This doesn’t have to be the case though. We’ll show you the perks of a bearish market.</p>



<h2 class="has-no-margin-bottom wp-block-heading">Shorting is now an option</h2>



<div style="height:18px" aria-hidden="true" class="wp-block-spacer has-no-margin-bottom"></div>



<p class="has-no-margin-bottom">Shorting is the act of <em>borrowing</em> an asset to sell it at its current price and buying back at a later date. In other words, selling now and buying later allows investors to profit from price drops. For example, let’s imagine shorting 1 BTC at $40,000 and closing the position at $30,000, this nets us $10,000, the difference between the initial and the current price ($40,000-$30,000). </p>



<div style="height:12px" aria-hidden="true" class="wp-block-spacer has-no-margin-bottom"></div>



<p class="has-no-margin-bottom">Nobody ever complained about bull markets, where trend following or long-biased trading strategies reign supreme. However, a ranging or bearish market unlocks other categories of strategies, like gridbots and long-short bots. By trading both uptrends and downtrends, we can theoretically double the potential returns a strategy can generate.</p>



<div style="height:12px" aria-hidden="true" class="wp-block-spacer has-no-margin-bottom"></div>



<p>One of the most famous examples of shorting is from Michael Burry, a hedge fund manager who bet heavily and successfully predicted the market crash of 2008. His story was later popularized in the movie <em>The Big Short</em>.</p>



<h2 class="has-no-margin-bottom wp-block-heading">From dollar-cost averaging to riches</h2>



<div style="height:18px" aria-hidden="true" class="wp-block-spacer has-no-margin-bottom"></div>



<p>A bull market can be thought of as a “take profit” market. The highest returns achieved are from investors who bought an asset during a bear market and sold it during a bull. This strategy becomes obvious when we take a look at Bitcoin’s historic prices.</p>



<p><img decoding="async" src="https://lh5.googleusercontent.com/c69bZp-SFHDFR2qXHZ7Ni_jgAGOHohEPg34Q2hwZSoQMNKvaJhaXEwc8AZ-XRMdm6nBbZ2ig99YeFby-kJs2Ujrok7ci37iSBbn0kGdcwnJF_FD0Pu6eYcRSDUXEg2TG6Bwy3pz6" style="width: 900px;"></p>



<p>The period between 2018 to the end of 2020 is considered a bear market by many. We can see a downward trend and a failure to break the all-time high set in 2017. During this period, Bitcoin dropped to around $3,000. Any investor who bought at this level would be looking at an approximate 20x return on their investment if they sold just 2 years later. This is a best-case scenario though, and not realistic for the average investor. Let’s take another approach. Assuming an investor dollar cost averaged (DCA) by buying Bitcoin at the end of every quarter starting in 2018 until 2021. We get the following entries:</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th>Date</th><th>Bitcoin Price</th></tr></thead><tbody><tr><td>31 March 2018</td><td>$6900</td></tr><tr><td>30 June 2018</td><td>$5900</td></tr><tr><td>30 September 2018</td><td>$6600</td></tr><tr><td>31 December 2018</td><td>$3800</td></tr><tr><td>31 March 2019</td><td>$4100</td></tr><tr><td>30 June 2019</td><td>$11900</td></tr><tr><td>30 September 2019</td><td>$8200</td></tr><tr><td>31 December 2019</td><td>$7300</td></tr><tr><td>31 March 2020</td><td>$6500</td></tr><tr><td>30 June 2020</td><td>$9200</td></tr><tr><td>30 September 2020</td><td>$10800</td></tr><tr><td>31 December 2020</td><td>$19700</td></tr></tbody></table></figure>



<p>If we calculate the average cost (purchase prices divided by the number of buys), we get an $8400 entry. Comparing this value with the $69,000 high reached in 2021, we get an 8x return. So while the return was lower, it took no effort to execute.</p>



<h2 class="has-no-margin-bottom wp-block-heading">Accumulate crypto or fiat?</h2>



<div style="height:18px" aria-hidden="true" class="wp-block-spacer has-no-margin-bottom"></div>



<p>With cryptocurrency, traders are usually split between Coin-Margined Futures or those who prefer Spot and Stablecoin-Margined Futures. For context, Coin-Margined Futures are paid in the base currency, so a winning BTC/USD trade will increase your BTC holdings. Imagine accumulating more BTC <em>while</em> it went from 10k to 60k. On the other hand, Stablecoin-Margined Futures and Spot rewards are paid in the quote currency. A winning BTC/USDT trade in this case will result in more USDT. You may find these are more useful in bear markets, where preserving wealth is crucial. As an investor, the decision to accumulate coins vs. stablecoins will also be influenced by your long-term outlook on each project.</p>



<figure class="wp-block-table is-style-stripes"><table class="has-fixed-layout"><thead><tr><th class="has-text-align-left" data-align="left"> <strong>Stablecoin-Margin</strong> </th><th> <strong>Coin-Margin</strong> </th></tr></thead><tbody><tr><td class="has-text-align-left" data-align="left"> Non-volatile </td><td> Volatile </td></tr><tr><td class="has-text-align-left" data-align="left"> Collateral doesn’t appreciate in $ value </td><td> Collateral may appreciate in $ value </td></tr><tr><td class="has-text-align-left" data-align="left"> Higher trading volume </td><td> Lower trading volume </td></tr><tr><td class="has-text-align-left" data-align="left"> High number of trading pairs </td><td> Low number of trading pairs </td></tr></tbody></table></figure>



<h2 class="has-no-margin-bottom wp-block-heading">What should I do?</h2>



<div style="height:18px" aria-hidden="true" class="wp-block-spacer has-no-margin-bottom"></div>



<p>There’s no right answer to which approach is best. Risk aversion and confidence in the projects you invest in must be considered, and differ between everyone. Let’s consider the traditional equities market for a moment. There are those whose investing method relies on picking stocks from companies they believe will experience growth, while there are others who trade solely based on predictions stemming from their technical analysis. Are you willing to spend the time required to daytrade? If not, options such as trading bots and dollar cost averaging exist. The final choice is up to you.</p>



			<div class="wp-block-uagb-post-grid uagb-post-grid  uagb-post__image-position-top uagb-post__image-enabled uagb-block-8b2c5634     uagb-post__items uagb-post__columns-3 is-grid uagb-post__columns-tablet-2 uagb-post__columns-mobile-1 uagb-post__equal-height" data-total="12" style="">

												<article class="uagb-post__inner-wrap">								<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/accumulation-bot-our-free-dca-bot/" target="_self" rel="bookmark noopener noreferrer" class='uagb-image-ratio-inherit'><img loading="lazy" decoding="async" width="1024" height="360" src="https://tuned.com/wp-content/uploads/2022/04/Featured-Image-1024x360.png" class="attachment-large size-large" alt="Free DCA Bot" srcset="https://tuned.com/wp-content/uploads/2022/04/Featured-Image-1024x360.png 1024w, https://tuned.com/wp-content/uploads/2022/04/Featured-Image-300x105.png 300w, https://tuned.com/wp-content/uploads/2022/04/Featured-Image-768x270.png 768w, https://tuned.com/wp-content/uploads/2022/04/Featured-Image.png 1085w" sizes="(max-width: 1024px) 100vw, 1024px" />					</a>
							</div>
						<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/accumulation-bot-our-free-dca-bot/" target="_self" rel="bookmark noopener noreferrer">Accumulation Bot &#8211; Our free DCA Bot!</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-04-09T14:16:12-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					April 9, 2022				</time>
							<span class="uagb-post__comment">
				<span class="dashicons-admin-comments dashicons"></span>					No Comments				</span>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					Guacamole Bot &#8211; Our free DCA Bot! In this article we will explain how our&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/accumulation-bot-our-free-dca-bot/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/what-is-the-arnaud-legoux-moving-average-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer" class='uagb-image-ratio-inherit'><img loading="lazy" decoding="async" width="1024" height="350" src="https://tuned.com/wp-content/uploads/2022/03/ALMAFEATURED-1024x350.png" class="attachment-large size-large" alt="" srcset="https://tuned.com/wp-content/uploads/2022/03/ALMAFEATURED-1024x350.png 1024w, https://tuned.com/wp-content/uploads/2022/03/ALMAFEATURED-300x102.png 300w, https://tuned.com/wp-content/uploads/2022/03/ALMAFEATURED-768x262.png 768w, https://tuned.com/wp-content/uploads/2022/03/ALMAFEATURED.png 1520w" sizes="(max-width: 1024px) 100vw, 1024px" />					</a>
							</div>
						<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/what-is-the-arnaud-legoux-moving-average-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer">What is the Arnaud Legoux Moving Average and how to use it on Tuned?</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-03-18T10:05:12-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					March 18, 2022				</time>
							<span class="uagb-post__comment">
				<span class="dashicons-admin-comments dashicons"></span>					No Comments				</span>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					In this article, we’ll be exploring what the Arnaud Legoux Moving Average (ALMA) indicator is,&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/what-is-the-arnaud-legoux-moving-average-and-how-to-use-it-on-tuned/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/price-action-series-chapter-6-market-conditions/" target="_self" rel="bookmark noopener noreferrer">Price Action Series Chapter 6 – Market Conditions</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-03-07T10:32:00-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					March 7, 2022				</time>
							<span class="uagb-post__comment">
				<span class="dashicons-admin-comments dashicons"></span>					No Comments				</span>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>In this chapter of the price action series, we will cover the different market conditions&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/price-action-series-chapter-6-market-conditions/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
			
									</article>
											</div>
			]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Price Action Series Chapter 3: Plot Support/Resistance</title>
		<link>https://tuned.com/blog/learning/price-action-series-chapter-3-plot-support-resistance/</link>
		
		<dc:creator><![CDATA[Simao Ferreira]]></dc:creator>
		<pubDate>Sat, 12 Feb 2022 19:32:52 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Price Action Series]]></category>
		<category><![CDATA[Trading Strategy]]></category>
		<category><![CDATA[Price action]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1440</guid>

					<description><![CDATA[In this chapter, we dive right into the rules for drawing support and resistance zones. We define a zone by taking into account: Swing highs and swing lows, meaning the highest and lowest points price reaches in a time period; Multiple touches and bounces off an area, the more the better; If the area you&#8217;re&#8230;]]></description>
										<content:encoded><![CDATA[
<p>In this chapter, we dive right into the rules for drawing support and resistance zones. We define a zone by taking into account:</p>



<ul class="wp-block-list"><li>Swing highs and swing lows, meaning the highest and lowest points price reaches in a time period;</li><li>Multiple touches and bounces off an area, the more the better;</li><li>If the area you&#8217;re looking at acted as both support and resistance;</li><li>Whether volatile price action bounces when touching these zones (e.g. is the price and volume reaction light, mediocre, heavy);</li><li>If the area was recently tested or not, meaning it is still of interest.</li></ul>



<p>If you miss the other chapters you can follow the link:</p>



<p><a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">Chapter 1: Price Action Series</a></p>



<p><a href="https://www.tuned.com/blog/learning/chapter-2-support-and-resistance/">Chapter 2: Support and Resistance</a></p>



<hr class="wp-block-separator"/>



<h2 class="wp-block-heading">Rules to Draw</h2>



<p>We don&#8217;t need all the rules above satisfied to classify as a zone of support and resistance, but if it includes a combination of multiple points listed above, the potential of a zone to be reliable or accurate is higher. It&#8217;s worth remembering that with trading there are no certainties, only probabilities. And we want to figure out how to be as reliable as possible in securing profits.</p>



<p>Summarizing the learnings so far, some points to consider when drawing support and resistance areas:</p>



<ol class="wp-block-list"><li>Keep it simple, less is more. Follow the rules and stick to the more obvious support and resistance zones and the extreme swing highs and lows.</li><li>Treat them as zones or areas and not strict lines or values. This is critical. We expect reversals in the general area and not a fixed number. When using fixed numbers we&#8217;ll often find fake breakouts before a reversal.</li><li>The more obvious, the better. We&#8217;re aiming at zones that multiple traders find and trade, this provides a higher chance of a reversal as more orders are submitted. Harder-to-spot support and resistance zones don&#8217;t tend to be as reliable.</li></ol>



<p>Some examples:</p>



<div class="wp-block-image"><figure class="aligncenter is-resized"><img loading="lazy" decoding="async" src="https://lh5.googleusercontent.com/sMxEiNR7krY1kOudlGdd5RPrNSWMbi_rzNTe_6dPmCs_YuDkPn_CRRpuFSpZyQh4AM15B32Y27_fXALmD9wJAyJJA8JgV2ynrEYQuzjST_wEgnGtHUXREzOCmbHURzRBDXEZ3i79" alt="Support and Resistance" width="646" height="242" title="Support and Resistance"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter"><img decoding="async" src="https://lh5.googleusercontent.com/WsHBhf6FshDKLk3x8Fd7Qe2MGwEcrIuziCB5KtD7rZ9Wd5g4cVNXovJ7uZu_DeRCt7D7Dz7avCFO2T6RSk8tDxofRJl5rrp5HEqC4OwaChKEJRHpVOHVsjTKlatH8g3c0ZBZGrQ5" alt="Support and Resistance" title="Support and Resistance"/></figure></div>



<p>Bellow, there is an example of how to automatically calculate and plot Support and Resistances (lines) on the Tuned script.&nbsp;</p>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// *********************************************
// Tuned 2021
// Example Script, don’t run on live markets
//
// *********************************************
// Release notes:
// 22/12/2021: Plot S/R lines
//
// *********************************************
left = intInput("Left Bars Lookback", 50)
right = intInput("Right Bars Lookback", 25)
quick_right = intInput("Quick swings Lookback", 5) // Used to try and detect a more recent significant swing.

pivot_high = neq(pivothigh(high,left,right), seriesOf(na))
pivot_lows = neq(pivotlow(low, left,right), seriesOf(na))

quick_pivot_high = neq(pivothigh(high,left,quick_right), seriesOf(na))
quick_pivot_lows = neq(pivotlow(low, left,quick_right), seriesOf(na))

level1 = valuewhen(quick_pivot_high, shift(high, quick_right), 0)
level2 = valuewhen(quick_pivot_lows, shift(low, quick_right), 0)
level3 = valuewhen(pivot_high, shift(high, right), 0)
level4 = valuewhen(pivot_lows, shift(low, right), 0)
level5 = valuewhen(pivot_high, shift(high, right), 1)
level6 = valuewhen(pivot_lows, shift(low, right), 1)
level7 = valuewhen(pivot_high, shift(high, right), 2)
level8 = valuewhen(pivot_lows, shift(low, right), 2)

green = seriesOf("#00ff00")
red = seriesOf("#ff0000")

def level1_col = iff(gte(close, level1), green, red)
def level2_col = iff(gte(close, level2), green, red)
def level3_col = iff(gte(close, level3), green, red)
def level4_col = iff(gte(close, level4), green, red)
def level5_col = iff(gte(close, level5), green, red)
def level6_col = iff(gte(close, level6), green, red)
def level7_col = iff(gte(close, level7), green, red)
def level8_col = iff(gte(close, level8), green, red)


plot(level1, "Level 1", level1_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level2, "Level 2", level2_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level3, "Level 3", level3_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level4, "Level 4", level4_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level5, "Level 5", level5_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level6, "Level 6", level6_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level7, "Level 7", level7_col, 1, PlotStyle.CIRCLES, 0, true)
plot(level8, "Level 8", level8_col, 1, PlotStyle.CIRCLES, 0, true)


//Signal Push
out(NEVER_ORDER)</pre>



<p>You can find below some screenshots of the script on tuned.</p>



<div class="wp-block-image"><figure class="aligncenter is-resized"><img decoding="async" src="https://lh4.googleusercontent.com/IArwMAAe58eHMiKTebYo2Ow-JKYpxTUfGMebfEIOZkJdLq4nS0KxDyquftrVxcI4J4L1eIL1eOcK5CzTt8D6nu7SWzowwSuaCeORVP8nIR8QGurYA2xbteuWgHF8qLBAYM7n96Kp" alt="Support and Resistance Plot" width="646" title="Tuned Script"/></figure></div>



<div class="wp-block-image"><figure class="aligncenter is-resized"><img decoding="async" src="https://lh5.googleusercontent.com/8eV7T4IV2Luvfp24uRQkGja3dYByOElqdGB6wG2VwqOYnr59C3c8r90d-_tlhgE8XdQ983qvWTnia2JY4PJPR1NmjmUDzHvAyI3sysLI1p6sBB4bOa3mXVyRi072-5KMaLGDyIqU" alt="Support and Resistance Plot" width="646" title="Script"/></figure></div>



<p>Next, we will dive into chapters 4, 5, and 6, touching on candles, market conditions, and trend lines. We will also include a candles patterns script that can be used in the support and resistance sample script as part of a trading strategy.</p>



<p>If you missed Chapter 1 follow this <a href="https://www.tuned.com/blog/category/learning/price-action-series/">Link</a></p>



<p>if you missed Chapter 2 follow this <a href="https://www.tuned.com/blog/learning/price-action-series/price-action-series-chapter-1/">Link</a> </p>



<p>Stay Tuned!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What is the Williams %R indicator and how to use it on Tuned?</title>
		<link>https://tuned.com/blog/learning/strategy-creation/what-is-the-williams-percent-range-indicator-and-how-to-use-it-on-tuned/</link>
		
		<dc:creator><![CDATA[Dale Brown]]></dc:creator>
		<pubDate>Wed, 09 Feb 2022 21:35:00 +0000</pubDate>
				<category><![CDATA[Strategy Creation]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Indicators]]></category>
		<category><![CDATA[Trading Platform]]></category>
		<category><![CDATA[Algorithmic Trading]]></category>
		<category><![CDATA[Trading Strategy]]></category>
		<category><![CDATA[Script Writing]]></category>
		<category><![CDATA[Syndication]]></category>
		<category><![CDATA[Technical Indicator]]></category>
		<category><![CDATA[Williams %R]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1423</guid>

					<description><![CDATA[We'll be talking about the Williams %R indicator in this article.

We will look at what it does, how it's used, and how it can be utilized on Tuned for algorithmic trading.]]></description>
										<content:encoded><![CDATA[
<p>We&#8217;ll be talking about the Williams %R (Percent Range)  indicator in this article.</p>



<p>We will look at what it does, how it&#8217;s used, and how it can be utilized on Tuned for algorithmic trading.<br><br></p>



<h2 class="wp-block-heading">Table of contents</h2>



<ol class="wp-block-list"><li><a href="#what-are-they">What is the Williams %R Indicator?</a></li><li><a href="#how-are-they-calculated">How is the Williams %R calculated?</a></li><li><a href="#common-uses">Common uses</a></li><li><a href="#example strategy">An example strategy using the Williams %R on Tuned</a></li><li><a href="#conclusion">Conclusion</a><br><br></li></ol>



<h2 class="wp-block-heading" id="what-are-they">What is the Williams %R Indicator?</h2>



<p>The Williams %R (Percent Range), created by Larry Williams, is a <a href="https://www.tuned.com/blog/learning/strategy-creation/what-is-the-momentum-indicator-and-how-to-use-it-on-tuned/">momentum</a> oscillator. It represents the price level in relation to the highest point in the previous period. The default period is generally set to 14. By doing this, you can monitor overbought and oversold conditions. Since the Williams %R fluctuates between 0 and -100, this would mean that readings between 0 and -20 are overbought, while readings between -80 and -100 are oversold. This means that the Williams %R is a bound indicator.<br><br></p>



<h2 class="wp-block-heading" id="how-are-they-calculated">How is Williams %R calculated?</h2>



<p>The calculation for the Williams %R indicator is straight forward.</p>



<p>Williams %R = (highest(high, n) &#8211; close) / (highest(high, n) &#8211; lowest(low, n))</p>



<p>Where n = the lookback period<br><br></p>



<h2 class="wp-block-heading" id="common-uses">Common uses</h2>



<p>When it comes to interpreting the Williams %R, we can say that a reading above -20 would indicate overbought levels, on the contrary, a reading below -80 would indicate oversold. When the %R value climbs over -20, it&#8217;s time to sell, and when it drops below -80, it&#8217;s time to buy. Williams %R has a tendency to peak ahead of price, making it a great indicator to identify a trend reversal. During stronger trends, however, the Williams %R can stay among the oversold or overbought zones for an extended period of time.&nbsp;</p>



<p>The indicator’s default settings tell a trader where the current price is in relation to the 14 period high. As mentioned above overbought/oversold levels are indicated using the traditional parameters of -20 for overbought and -80 for oversold. That is why it’s preferable to wait for a shift in price action, before buying or selling. For example, following along with the <a href="https://www.tuned.com/blog/learning/strategy-creation/what-is-macd-and-how-to-use-it-in-tuned-script/">MACD</a>.<br><br></p>



<h2 class="wp-block-heading" id="example strategy">An example strategy using Williams %R on Tuned</h2>



<p class="has-text-align-center"><img loading="lazy" decoding="async" src="https://lh6.googleusercontent.com/x1w5RnYr_o-VsBR55LF8jxeMUg90NreSEfY0labRpoYhMpCcsqqo8We7TisD8mSZkMgePAtNnj7RUCzVb1wM4qeVD_x9eWEJV_4rM4OVpY26hanF68jo-O4Mo30Q1N5ECBbF7ZTa" width="624" height="276"></p>



<p>The code is as follows:</p>



<h3 class="wp-block-heading">Tuned Script</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">// Inputs
length = intInput("Length", 14)
src = srcInput("Source", "close")
lowerThresh = seriesOf(numInput("Lower Threshold", -80.0))
upperThresh = seriesOf(numInput("Upper Threshold", -20.0))
 
// Function formula and Calculation
def _pr(length) {
    max = highest(high, length)
    min = lowest(low, length)
    100.0 * (src - max) / (max - min)
}
 
 
// Setting the Variables ready to be Plot
percentR = _pr(length)
 
// Plot the output of the Indicator
obPlot = plot(upperThresh, "Upper Band", "#787B86", 1, PlotStyle.LINE, 0, false)
plot(seriesOf(-50.0), "Middle Level", "#787B86", 1, PlotStyle.LINE, 0, false)
osPlot = plot(lowerThresh, "Lower Band", "#787B86", 1, PlotStyle.LINE, 0, false)
fill(obPlot, osPlot, "#B18BF3", 90, "Fill", false)
plot(percentR, "%R", "#7E57C2", 1, PlotStyle.LINE, 0, false)
 
 
// Setting conditions for Entry/Exit
buyEntry = crossover(percentR, lowerThresh)
sellExit = crossunder(percentR, upperThresh)
 
// Output Signals
out(signalIf(buyEntry, sellExit))</pre>



<h3 class="wp-block-heading">Pine Alpha</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">//@version=4
//Tuned supports Pine Version 4 Only
strategy("Williams Percent Range", shorttitle="Williams %R")
 
// Inputs
length = input(title="Length", defval=14)
src = input(close, "Source")
lowerThresh = input(title="Lower Threshold", defval = -80.0)
upperThresh = input(title="Upper Threshold", defval = -20.0)
 
// Function formula and Calculation
_pr(length) =>
    max = highest(high, length)
    min = lowest(low, length)
    100 * (src - max) / (max - min)
 
// Setting the Variables ready to be Plot
percentR = _pr(length)
 
// Plot the output of the Indicator
obPlot = plot(upperThresh, title="Upper Band", color=#787B86)
plot(-50, title="Middle Level", linestyle=hline.style_dotted, color=#787B86)
osPlot = plot(lowerThresh, title="Lower Band", color=#787B86)
fill(obPlot, osPlot, title="Background", color=#B18BF3, transp = 90)
plot(percentR, title="%R", color=#7E57C2)
 
 
// Setting conditions for Entry/Exit
buyEntry = crossover(percentR, lowerThresh)
sellExit = crossunder(percentR, upperThresh)
 
// Output Signals
strategy.order("Long", strategy.long, when = buyEntry)
 
strategy.close("Close", when = sellExit and strategy.position_size > 0.0)</pre>



<p>The strategy above will buy when the Williams %R indicator crosses above the -80 threshold. A sell signal is produced when the indicator crosses below the -20 threshold.<br></p>



<p class="has-text-align-center"><img loading="lazy" decoding="async" src="https://lh5.googleusercontent.com/47Ubkz9NSjbryGfehvLYqpjqUNrCxdM3iVWLrIOx3cfUJ9nlDiblVfqnqe2_UzO_Bp4d1Req3zPM9XHEEl06X2OkyQ0tZctumOmhKn64yLoLpr3TF5GdGbbT6D6lzeQncuT7YVy0" width="624" height="291"><br><em>Adding risk management rules, like stop loss and take profit, can also help improve profitability.</em><br><br></p>



<h3 class="wp-block-heading">How does it behave?</h3>



<ul class="wp-block-list"><li>The market sentiment is overbought when the Williams %R reads higher than -20</li><li>The market sentiment is oversold when the Williams %R reads less than -80</li><li>The Williams %R is range bound between 0 and -100</li><li>Overbought or oversold does not imply that the price will reverse. Overbought just implies the price is towards the high end of its recent range, while oversold simply means the price is near the low end.<br><br></li></ul>



<h2 class="wp-block-heading" id="conclusion">Conclusion</h2>



<p>Williams %R (Percent Range) used on its own, can already print a clear story by showing if the market has been exhausted. The Williams %R, like other indicators, isn&#8217;t perfect. Traders shouldn&#8217;t rely on it as their sole source of information when making decisions. However, when used correctly alongside other indicators, there is a larger ratio of a positive trading experience. The Williams %R is more popular among traders because of this.</p>



<p>With that being said, I hope this has helped your understanding of its function, the conditions of the strategy and how to make it even better!</p>



<p class="has-text-align-right">Have fun scripting!</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>The No-Code Strategy Template by Tuned</title>
		<link>https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/</link>
					<comments>https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/#respond</comments>
		
		<dc:creator><![CDATA[Tuned]]></dc:creator>
		<pubDate>Fri, 04 Feb 2022 23:58:49 +0000</pubDate>
				<category><![CDATA[Strategy Creation]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1410</guid>

					<description><![CDATA[Out of 50,000 trading bots there’s a strong chance at least one is profitable. In 2021 Tuned traders tested over 200 million bots, but we noticed an obstacle. Despite free unlimited access, Tuned’s technical nature made it difficult for those unfamiliar. Believing we could do better, we wrote a No-Code Strategy Template that lets you&#8230;]]></description>
										<content:encoded><![CDATA[
<p>Out of 50,000 trading bots there’s a strong chance at least <em>one</em> is profitable. In 2021 Tuned traders tested over 200 million bots, but we noticed an obstacle.</p>



<p>Despite free unlimited access, Tuned’s technical nature made it difficult for those unfamiliar. Believing we could do better, we wrote a No-Code Strategy Template that lets you harness Tuned backtesting and basic strategy creation without having to code. We think it’s so easy to use that even someone new to trading can create profitable trading strategies.</p>



<p><strong>Here’s how it works</strong></p>



<p>The template is a collection of technical indicators that produce a buy or sell action. These are broken down into two categories, Signals and filters. It’s the type of logic that you might run manually with the help of Tradingview, but is easily automated with Tuned. There’s also the massive benefit of running thousands of parallel tests to see which iteration produces the most profit.</p>



<p>It’s built with the help of our code editor but don’t be dissuaded! This will make sense if you take a few minutes to continue reading. Let’s have a look at the building blocks.</p>



<p><strong>Signals</strong> are a specific trigger that tells the bot to take action. In the example below, we buy right after the price crosses over our moving average (blue line), and sell right after it crosses below.&nbsp;</p>



<p><strong>Filters</strong> are conditions that can be true for a period of time. In the example below, because RSI remains above our custom threshold, we allow the buy signal to go through.</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/f04jq7vk0BrWyFBjsuOaGtVlV84hTwwJTUWGkUT4neHO6csxmjZW8vcqJgudX625VekIllVi_SyJI9I_jWM9chvAJB39d4DTyT9VSr-I9QYUOy6NMCPRSYO3sRdgsAJ4Rio3Vr9o" alt=""/></figure>



<p>Given these two categories, our no-code template uses a collection of indicators that can be toggled via checkbox. If that’s all you needed to understand then happy trading! I think a deeper dive makes sense though to understand these indicators and built-in trading philosophy.</p>



<p><strong>Buy Signals</strong></p>



<p>This template is programmed to be picky with market entry. If you toggle more than one buy signal at a time, the trading bot will only buy if both signals are present at the same point in time. The likelihood of this could be low and you may get a low amount of trades. This can apply less to some filters.</p>



<ol class="wp-block-list"><li><strong>Moving Average Crossover</strong> is the interaction between a fast and slow moving average. Typically, we buy when the fast moving average crosses over the slow moving one. The idea is that by comparing the short-term trend with a long-term trend we can take advantage of positive price movements.<br><br><em>Fast and Slow Moving Average Lookback</em>: is the length of the moving average. A simple moving average with a lookback of 7 will provide the average price of the previous 7 candles (periods).<br><em>Moving Average Type</em>: is a dropdown that lets you select which moving average to use. Want to learn more about <a href="https://www.tuned.com/what-is-and-how-to-use-moving-averages-in-tuned-script/">moving averages</a>?</li></ol>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://lh6.googleusercontent.com/3B_5057MShgKldF6i5TOexuIoVwqIdvkQ77ZH297RenqsaJb9S0FrfWQu19yNqeJx27X_0nED4USTe8jUoIE7YtgSYWPuZXYKwR0avlG2QjjF7TUHtAtYSQu_hb940L1wiobiK40" alt="" width="600"/></figure>



<ol class="wp-block-list" start="2"><li><strong>Price Crossover</strong> is when we measure price against a single moving average. Like our example from before, if price crosses over the trend, we buy.</li></ol>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://lh5.googleusercontent.com/CJaM77jm-k3PIlg2a_I6yNokrPlBnMVBX7cYGVnzYDXNFjqya777m_2VyLMJR7gvfDxTxg5-dOjq1JCi_b5RjAUuACqTcgFGq4eC4LbK3CR0z_9My5VGDQNRcl3niqbcbynD8NZD" alt="" width="600"/></figure>



<ol class="wp-block-list" start="3"><li><strong>MACD with Signal Crossover</strong> is a bit long to explain here. To give a tl;dr, it’s visually similar to the moving average crossover from before, but behaves differently. You’re welcome to play with the input values but if you’re new to this indicator we recommend <a href="https://www.tuned.com/what-is-macd-and-how-to-use-it-in-tuned-script/">reading about the MACD</a>.<br></li></ol>



<figure class="wp-block-image is-resized"><img decoding="async" src="https://lh5.googleusercontent.com/I1cRP2xgoP6iZJaFFp4Fl2BCfoymdnZ9o4bpBLhLSKjM1Esg7I-mnFu3-Gjg8WRMFlYpGoSEqARX_8CoAUh-19nQve_IzQ4Ggy4yizQzMeHRmZ5io-k4WsvaEAB2gUoHmeMiv8J6" alt="" width="600"/></figure>



<p><strong>Buy Filters</strong></p>



<ol class="wp-block-list"><li><strong>Fast Moving Average &gt; Slow Moving Average</strong> is not to be confused with a crossover. Unlike a crossover, we are measuring <em>if</em> one is larger than the other. This condition can remain true for a period of time, and is not limited to one instance.<br><br></li><li><strong>RSI is above threshold</strong> tests if trading momentum is above a certain point. This requirement can remain true for a period of time and is not restricted to a specific instance.<br><br><em>RSI Lookback</em>: has a default value of 14 candles, and is the period over which momentum is measured.<br><em>RSI Threshold</em>: is the point that will allow a buy signal, if crossed. Enabling this filter will restrict buy signals if RSI is below the threshold.</li></ol>



<p><strong>Sell Signals</strong></p>



<p>Unlike Buy Signals, any of the selected Sell Signals will trigger a close position. That’s to say, assuming a good entry, we want to capture profits or cut losses as soon as an opportunity shows itself.</p>



<p></p>



<ol class="wp-block-list"><li><strong>Moving Average Crossunder </strong>is the same idea as the buy signal. By measuring two moving averages, a long-term and short-term trend, we can try and predict if price will drop. Once the fast moving average (short-term trend) crosses below the slow moving average (long-term trend)&nbsp; we sell.<br><br></li><li><strong>Price Crossunder </strong>refers to the point at which the price falls below our moving average. The strategy will sell on the candle immediately after this is detected.<br><br></li><li><strong>CCI breakout </strong>is a momentum indicator that compares current price with the average price over time. The default configuration in our template is to exit a position once we think CCI has reached a high point. For more info you can read <a href="https://www.tuned.com/what-is-cci-and-how-to-use-it-in-tuned-script/">our article about CCI</a>.<br><br><em>CCI Lookback</em>: has a default value of 20 candles, and is the period over which the momentum oscillator is measured.<br><em>CCI Threshold</em>: is the bar that triggers a sell signal, if crossed. Enabling this indicator will only trigger a sell signal if CCI crosses above the threshold.<br><br><img loading="lazy" decoding="async" width="389" height="142" src="https://lh6.googleusercontent.com/CMCuetJViJIT152hZgFkikyWHevm3xJGf0Rt_ItB1Xglvc0Wl2Rl3IgLFKq1Mo6RAS8u7LRP5f3ELF0kFid6jndTaI0_k9w724SBahGx_N1W3g-PzXttulsrlf21MlbVvwQ8eWtW"><br><br></li><li><strong>Percent ATR crossunder </strong>doesn’t tell us about trend direction, only volatility. Since high values indicate high volatility, we wait for it to cross below a predetermined point. It’s a way of saying ‘we think this run up is done’, since we would have originally bought assuming a price increase. We exit our position once we feel like there’s no more upward volatility.&nbsp;<br><br>The regular ATR indicator uses absolute values, but we’ve elected to add percent-based calculations to ours. This helps accommodate large swings in price.<br><br><em>ATR Lookback</em>: is normally 14 candles.<br><br><em>ATR Threshold</em>: is the bar that triggers a sell signal, if crossed below. Enabling this indicator will only trigger a sell signal if ATR crosses below the threshold.<br><br><img loading="lazy" decoding="async" width="402" height="128" src="https://lh3.googleusercontent.com/ZQERySWAkALZYwhN6cD06elfVjJCMyR09manuTmSgjWRI0c8mMEu3LQ1466S8F5raUt0UrKBl6rC0ABNw9oEJp0CY60AnrcjwiAXRMsIgLl29Umz0CE8XU-vSLa4BV5Re30gTxh1"></li></ol>



<p><strong>Great, can you tell me how to access this template?</strong></p>



<p>You can find it in the community library under the name: Tuned No-Code Strategy Template</p>



<figure class="wp-block-image"><img decoding="async" src="https://lh6.googleusercontent.com/Yzy8rEaSS0DDtS-Q_EYhpIMzKQiAI7Lkda76wiu5NpOay8TeUA168v2QPrTkrb7NJT3hSQ_hEBnijEM5-TUZyfZDwzFS-wWTzdw3mt-UuzFqDMa1vEfHUWMSXnEX7IEdYuWgtGIg" alt=""/></figure>



<p>If you’ve read everything above and are wanting a bit more we welcome you to try playing with the code, or talk about it with others on our <a href="https://discord.com/invite/nN8PaRW85K">Discord server</a>! It’s not the shortest script, but there are a lot of comments that explain how things work. And who knows, you might like Pine Script!</p>



<p>Happy Trading!</p>
]]></content:encoded>
					
					<wfw:commentRss>https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>What is the On-Balance Volume indicator and how to use it on Tuned?</title>
		<link>https://tuned.com/blog/learning/strategy-creation/what-is-the-on-balance-volume-indicator-and-how-to-use-it-on-tuned/</link>
		
		<dc:creator><![CDATA[Fabian Loureiro]]></dc:creator>
		<pubDate>Sun, 30 Jan 2022 18:34:45 +0000</pubDate>
				<category><![CDATA[Learning]]></category>
		<category><![CDATA[Strategy Creation]]></category>
		<category><![CDATA[Technical Indicator]]></category>
		<category><![CDATA[indicator]]></category>
		<category><![CDATA[OBV]]></category>
		<category><![CDATA[on-balance volume]]></category>
		<guid isPermaLink="false">https://www.tuned.com/?p=1371</guid>

					<description><![CDATA[In this article, we’ll be exploring what the On-Balance Volume (OBV) indicator is, what it measures, common uses, and how it can be applied to Tuned and algorithmic trading in general.]]></description>
										<content:encoded><![CDATA[
<p>In this article, we’ll be exploring what the On-Balance Volume (OBV) indicator is, what it measures, common uses, and how it can be applied to Tuned and algorithmic trading in general.<br><br></p>



<h2 class="wp-block-heading">Table of contents</h2>



<ol class="wp-block-list"><li><a href="#1">What is the On-Balance Volume indicator?</a></li><li><a href="#2">How is the On-Balance Volume calculated?</a></li><li><a href="#3">Common uses</a></li><li><a href="#4">An example strategy using OBV on Tuned</a></li><li><a href="#5">Conclusion</a><br><br></li></ol>



<h2 class="wp-block-heading" id="1">What is the On-Balance Volume indicator?</h2>



<p>On-Balance Volume (OBV) is an indicator that measures momentum. It was created in 1932 by Joseph Granville, making its first appearance in his book <em>Granville&#8217;s New Key to Stock Market Profits.</em></p>



<p>It measures momentum by either subtracting or adding the volume of a candle to its on-balance volume total, candles whose closing price was lower than its opening price, have their volume number subtracted from the total, and candles whose closing price was higher than its open price have their volume added to the total. If the opening and closing prices are identical, no calculations are performed.</p>



<p>OBV is an unbound indicator since the theoretical volume of any given candle of an asset is unlimited.</p>



<p>One of the main characteristics of the OBV indicator is that the absolute OBV value is more or less irrelevant for use as a signal as this value is heavily influenced by the starting point, but the direction and slope are not. Due to the nature of it being a cumulative indicator, different starting points greatly affect the quantitative OBV value.</p>



<ul class="wp-block-list"><li>A rising OBV value indicates an increase in price accompanied by volume;</li><li>A descending OBV value indicates a decrease in price accompanied by volume;</li><li>A stable OBV value indicates no fluctuations between the opening and closing prices’ volume. This suggests buyers and sellers are in balance.</li></ul>



<h2 class="wp-block-heading" id="2">How is the On-Balance Volume calculated?</h2>



<p>The formula for calculating the OBV is the following:</p>



<p><img loading="lazy" decoding="async" src="https://lh6.googleusercontent.com/cgRvIxfgzNtOHD8Eg_NdhAe4EuP2YFHBnGzeZ0qRw5dTiyeK7pd0DZG4SuDPoSp2pCJyKe6NfEj3wXHYQ03fzfFYZwMJILLHQIK57RsZw08TVG-0TLt36UBybFzjPskquv6G0waF" width="624" height="303"></p>



<h2 class="wp-block-heading" id="3">Common uses</h2>



<p>The On-Balance Volume indicator was created on a basis that volume is the main price movement catalyst. It was created to predict when the price of an asset is due for a major move, but it cannot predict the direction of those moves. As such, it’s difficult to derive primary signals from it, better serving the function of a confirmation or filter indicator. In short, OBV helps you:</p>



<ul class="wp-block-list"><li>Identify divergences between volume and price;</li><li>Predict periods of incoming volatility;</li><li>Confirm trends or reversals.</li></ul>



<h2 class="wp-block-heading" id="4">An example strategy using OBV in Tuned</h2>



<p><img decoding="async" src="https://lh6.googleusercontent.com/R9kArBTr5wIQ_pKgjjgVQHai2IHrKYigB3O2LzyS5rBfQB3cPSoY1ZusSm3YHXCub5ZZRaN-l8vML42Hc3objM9FqOz9GkpCRse1TWL8ZAy2h5LFWkfe60wa_rdkLm3FoGztLKcb" style="width: 900px;"></p>



<p>The code is as follows:</p>



<h3 class="wp-block-heading">Tuned Script</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;sup>//Inputs
ObvEmaLength = intInput("OBV EMA LENGTH", 32)
 
//indicator
OBV = obv(close, volume)
OBVEMA = ema(OBV, ObvEmaLength)
 
//Conditions
buy = crossover(OBV, OBVEMA)
sell = crossunder(OBV, OBVEMA)

//Plot
plot(OBV, "On-Balance Volume", "#00FF2A", 2, PlotStyle.LINE,3, false)
plot(OBVEMA, "On-Balance Volume", "#0026FF", 2, PlotStyle.LINE,3, false)

//Signal Push
out(signalIf(buy, sell))&lt;/sup></pre>



<h3 class="wp-block-heading">Pine Alpha</h3>



<pre class="EnlighterJSRAW" data-enlighter-language="generic" data-enlighter-theme="" data-enlighter-highlight="" data-enlighter-linenumbers="" data-enlighter-lineoffset="" data-enlighter-title="" data-enlighter-group="">&lt;sup>//@version=4
strategy(title="OBV Example", overlay = false)
 
//Inputs
EmaLength = input(title="OBV EMA Length", defval=32)
 
//Indicators
OBV = obv
OBVEma = ema(OBV, EmaLength)
 
//Plots
plot(OBV, "On-Balance Volume", color.green)
plot(OBVEma, "On-Balance Volume", color.blue)
 
//conditions
buy = crossover(OBV, OBVEma)
sell = crossunder(OBV, OBVEma)
 
//Entry
strategy.order("long", strategy.long, when=buy)
strategy.order("Short", strategy.short, when=sell)&lt;/sup></pre>



<p>For demonstration purposes, a strategy was coded with the following parameters:</p>



<ul class="wp-block-list"><li>OBV EMA Length = 32;</li><li>Long when OBV crosses over the OBV EMA;</li><li>Short when OBV crosses under the OBV EMA;</li><li>Stop Loss = 6%;</li><li>Take Profit = 16%.<br></li></ul>



<p>Finding a profitable trading strategy that solely uses the OBV indicator as its primary signal is difficult and unorthodox. We opted by plotting an EMA of the OBV value and setting conditions to open trades when a crossover or crossunder between the OBV and EMA value occurs. An EMA is an excellent tool to remove noise from any data set and crosses indicate a change in the OBV direction. This strategy aims to open a trade when a new trend or reversal is detected.&nbsp;</p>



<h3 class="wp-block-heading">How does it behave?</h3>



<ul class="wp-block-list"><li>In sideways markets, this strategy is prone to whipsaws, triggering too many signals.</li><li>In trending markets, this strategy can produce profitable trades by following the trend, higher timeframes produced better results in our testing due to a lower amount of market data noise.</li></ul>



<p><img decoding="async" src="https://lh3.googleusercontent.com/HMI69r2ZxGh5nb8YM9wqasDJs52R87FgOhbcEExJC5Zxhl8xHP0iXboDN9hM_VQK4rD3gUVQCJd-v4qZ8qFYVbRFFirRPb3YPbJbFxyIL5jlmO50bbmiNX3iye55gJxRvlzAal_v" style="width: 900px;"></p>



<h2 class="wp-block-heading" id="5">Conclusion</h2>



<p>Based on our research and the results we found during testing, the OBV indicator is a versatile indicator for multiple use cases. There’s a lack of trading strategies that take advantage of this indicator, this leads to trading opportunities by thinking outside the box and leveraging the full capabilities of the OBV indicator. There are infinite ways of doing so, such as specifying % change thresholds of the OBV’s quantitative value to derive signals. We were able to produce profitable strategies by making use of Tuned’s batch testing feature to find optimal threshold values.</p>



<p></p>



<p class="has-text-align-right">Have fun scripting!<br><br><br></p>



			<div class="wp-block-uagb-post-grid uagb-post-grid  uagb-post__image-position-background uagb-post__image-enabled uagb-block-f8775c93     uagb-post__items uagb-post__columns-2 is-grid uagb-post__columns-tablet-2 uagb-post__columns-mobile-1 uagb-post__equal-height" data-total="6" style="">

												<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/" target="_self" rel="bookmark noopener noreferrer">The No-Code Strategy Template by Tuned</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2022-02-04T16:58:49-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					February 4, 2022				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>Out of 50,000 trading bots there’s a strong chance at least one is profitable. In&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/the-no-code-strategy-template-by-tuned/" target="_self" rel="bookmark noopener noreferrer"><img loading="lazy" decoding="async" width="300" height="194" src="https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail-300x194.png" class="attachment-medium size-medium" alt="" srcset="https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail-300x194.png 300w, https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail-768x497.png 768w, https://tuned.com/wp-content/uploads/2022/02/NoCode-Strategy-Template-Thumbnail.png 813w" sizes="(max-width: 300px) 100vw, 300px" />					</a>
									</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/creating-better-trading-strategies-the-results/" target="_self" rel="bookmark noopener noreferrer">Creating Better Trading Strategies — The Results</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2021-12-03T10:30:00-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					December 3, 2021				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>Welcome back, data science fans!&nbsp; Continuing from the second article, where I discussed the clustering&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/creating-better-trading-strategies-the-results/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
							</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/what-is-tuned-script-and-how-is-it-different-from-pine-script/" target="_self" rel="bookmark noopener noreferrer">What Is Tuned Script and How Is It Different From Pine Script?</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2021-06-20T23:56:32-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					June 20, 2021				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>Table of contents: An alternative to Pine ScriptData FlowWhy two different languages?Example of Pine Script&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/what-is-tuned-script-and-how-is-it-different-from-pine-script/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/what-is-tuned-script-and-how-is-it-different-from-pine-script/" target="_self" rel="bookmark noopener noreferrer"><img loading="lazy" decoding="async" width="300" height="298" src="https://tuned.com/wp-content/uploads/2021/06/Screenshot-2021-06-18-at-10.35.13-PM-300x298.png" class="attachment-medium size-medium" alt="Tuned Script" srcset="https://tuned.com/wp-content/uploads/2021/06/Screenshot-2021-06-18-at-10.35.13-PM-300x298.png 300w, https://tuned.com/wp-content/uploads/2021/06/Screenshot-2021-06-18-at-10.35.13-PM-150x150.png 150w, https://tuned.com/wp-content/uploads/2021/06/Screenshot-2021-06-18-at-10.35.13-PM.png 592w" sizes="(max-width: 300px) 100vw, 300px" />					</a>
									</div>
			
									</article>
																<article class="uagb-post__inner-wrap">								<h4 class="uagb-post__title uagb-post__text">
				<a href="https://tuned.com/blog/learning/strategy-creation/what-is-cci-and-how-to-use-it-in-tuned-script/" target="_self" rel="bookmark noopener noreferrer">What is CCI and How to Use It in Tuned Script</a>
			</h4>
						<div class='uagb-post__text uagb-post-grid-byline'>
								<time datetime="2021-05-18T10:56:27-07:00" class="uagb-post__date">
				<span class="dashicons-calendar dashicons"></span>					May 18, 2021				</time>
						</div>
							<div class='uagb-post__text uagb-post__excerpt'>
					<p>What is the Commodity Channel Index (CCI)?Key points about the CCIHow to add the CCI&#8230;				</div>
						<div class="uagb-post__text uagb-post__cta wp-block-button">
				<a class="wp-block-button__link uagb-text-link" style="" href="https://tuned.com/blog/learning/strategy-creation/what-is-cci-and-how-to-use-it-in-tuned-script/" target="_self" rel="bookmark noopener noreferrer">Read More</a>
			</div>
						<div class='uagb-post__image'>
									<a href="https://tuned.com/blog/learning/strategy-creation/what-is-cci-and-how-to-use-it-in-tuned-script/" target="_self" rel="bookmark noopener noreferrer"><img loading="lazy" decoding="async" width="300" height="79" src="https://tuned.com/wp-content/uploads/2021/05/CCI-2-300x79.png" class="attachment-medium size-medium" alt="" srcset="https://tuned.com/wp-content/uploads/2021/05/CCI-2-300x79.png 300w, https://tuned.com/wp-content/uploads/2021/05/CCI-2-768x202.png 768w, https://tuned.com/wp-content/uploads/2021/05/CCI-2.png 811w" sizes="(max-width: 300px) 100vw, 300px" />					</a>
									</div>
			
									</article>
											</div>
			]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
