OPEN-SOURCE SCRIPT

Equilibrium Candles + Pattern [Honestcowboy]

The Equilibrium Candles is a very simple trend continuation or reversal strategy depending on your settings.

How an Equilibrium Candle is created:
  1. We calculate the equilibrium by measuring the mid point between highest and lowest point over X amount of bars back.
  2. This now is the opening price for each bar and will be considered a green bar if price closes above equilibrium.
  3. Bars get shaded by checking if regular candle close is higher than open etc. So you still see what the normal candles are doing.


Why are they useful?


The equilibrium is calculated the same as Baseline in Ichimoku Cloud. Which provides a point where price is very likely to retrace to. This script visualises the distance between close and equilibrium using candles. To provide a clear visual of how price relates to this equilibrium point.

This also makes it more straightforward to develop strategies based on this simple concept and makes the trader purely focus on this relationship and not think of any Ichimoku Cloud theories.

Script uses a very simple pattern to enter trades:
快照
  1. It will count how many candles have been one directional (above or below equilibrium)
  2. Based on user input after X candles (7 by default) script shows we are in a trend (bg colors)
  3. On the first pullback (candle closes on other side of equilibrium) it will look to enter a trade.
  4. Places a stop order at the high of the candle if bullish trend or reverse if bearish trend.
  5. If based on user input after X opposite candles (2 by default) order is not filled will cancel it and look for a new trend.


Use Reverse Logic:
There is a use reverse logic in the settings which on default is turned on. It will turn long orders into short orders making the stop orders become limit orders. It will use the normal long SL as target for the short. And TP as stop for the short. This to provide a means to reverse equity curve in case your pair is mean reverting by nature instead of trending.

ATR Calculation:
Averaged ATR, which is using ta.percentile_nearest_rank of 60% of a normal ATR (14 period) over the last 200 bars. This in simple words finds a value slightly above the mean ATR value over that period.

Big Candle Exit Logic:
Using Averaged ATR the script will check if a candle closes X times that ATR from the equilibrium point. This is then considered an overextension and all trades are closed.
This is also based on user input.

Simple trade management logic:
快照
  1. Checks if the user has selected to use TP and SL, or/and big candle exit.
  2. Places a TP and SL based on averaged ATR at a multiplier based on user Input.
  3. Closes trade if there is a Big Candle Exit or an opposite direction signal from indicator.


Script can be fully automated to MT5

There are risk settings in % and symbol settings provided at the bottom of the indicator. The script will send alert to MT5 broker trying to mimic the execution that happens on tradingview. There are always delays when using a bridge to MT5 broker and there could be errors so be mindful of that. This script sends alerts in format so they can be read by tradingview.to which is a bridge between the platforms.

Use the all alert function calls feature when setting up alerts and make sure you provide the right webhook if you want to use this approach.

There is also a simple buy and sell alert feature if you don't want to fully automate but still get alerts. These are available in the dropdown when creating an alert.

Almost every setting in this indicator has a tooltip added to it. So if any setting is not clear hover over the (?) icon on the right of the setting.

The backtest uses a 4% exposure per trade and a 10 point slippage. I did not include a commission cause I'm not personaly aware what the commissions are on most forex brokers. I'm only aware of minimal slippage to use in a backtest. Trading conditions vary per broker you use so always pay close attention to trading costs on your own broker. Use a full automation at your own risk and discretion and do proper backtesting.
automationCandlestick AnalysisCandlestick analysisIchimoku Cloudichimokukinkohyosimpletradingstrategy

开源脚本

本着真正的TradingView精神,此脚本的作者已将其开源,以便交易者可以理解和验证它。向作者致敬!您可以免费使用它,但在出版物中重复使用此代码受网站规则约束。 您可以收藏它以在图表上使用。

想在图表上使用此脚本?


✅ Learn how I trade as a FUND MANAGER with my private indicators here.

Website —> honestalgo.com
Website —> honestalgo.com
Website —> honestalgo.com

FREE telegram channel —> t.me/honestalgo
更多:

免责声明