OPEN-SOURCE SCRIPT

Heikin-Ashi Smoothed with option to change MA types CryptoJoncis

ที่อัปเดต:
Pine Script version=3
Author CryptoJoncis

Heikin-Ashi Smoothed
The Heikin-Ashi Smoothed study is based upon the standard Heikin-Ashi study with additional moving average calculations. The following is the calculation formula for the bars:
1. The current bar Open, High, Low, Close values are smoothed individually by using the moving average type specified by the Moving Average Type 1 Input with a length/period specified by the Moving Average Period 1 Input.
2. The Heikin-Ashi bar Open, High, Low, Close values are set using the smoothed values from step 1. This is performed using the standard Heikin-Ashi formula.
3. The final Heikin-Ashi Open, High, Low, Close values are calculated by doing a second smoothing of the bar values from step 2 by using the moving average type specified by the Moving Average Type 2 Input with a length/period specified by the Moving Average Period 2 Input.


If you choose to tick the box where it offers to use only one smoothed HA then it skips the third/final step and you do not need to choose the second MA type for it to work.
Remember, using FRAMA, always make sure you use even number for length.

For simple Heikin-Ashi, please tick single smoothed and DEFAULT (Not smoothed as there are no MA used)

Heikin-Ashi bars are calculated:
1. Close = (Open + High + Low + Close) / 4
This is the average price of the current bar.
2. Open = (Open of Previous Bar + Close of Previous Bar) / 2
This is the midpoint of the previous bar.
3. High = Max of (High, Open, Close)
Highest value of the three.
4. Low = Min of (Low, Open, Close)
Lowest value of the three.

Any questions/suggestions/errors or spelling mistakes? Please leave a comment and let me know. I will try to fix it.
This took me few days to finish, so I hope you will find it useful.

Would you like to have more MA type choices? Please comment down with any other which aren't included in this indicator and I will research them and add.

MA included in this script:
  • * Tillson Moving Average (T3)
    * Double Exponential Moving Average (DEMA)
    * Arnaud Legoux Moving Average (ALMA)
    * Least Squares Moving Average (LSMA)
    * Simple Moving Average (SMA)
    * Exponential Moving Average (EMA)
    * Weighted Moving Average (WMA)
    * Smoothed Moving Average (SMMA)
    * Triple Exponential Moving Average (TEMA)
    * Hull Moving Average (HMA)
    * Adaptive moving average (AMA)
    * Fractal Adaptive Moving Average (FAMA)
    * Variable Index Dynamic Average (VIDYA)
    * Triangular Moving Average (TRIMA)


You can use,publish,modify this code in any way as you wish, but only if you reference me after.
You are not allowed to sell it as it is.

If this code is useful to you, then consider to buy me a coffee (or better a pint of beer) by donating Bitcoin or Etherium to:

BTC: 3FiBnveHo3YW6DSiPEmoCFCyCnsrWS3JBR
ETH: 0xac290B4A721f5ef75b0971F1102e01E1942A4578

References:
sierrachart.com/index.php?page=doc/StudiesReference.php&ID=314&Name=Heikin-Ashi_Smoothed
investopedia.com/trading/heikin-ashi-better-candlestick/
binarytribune.com/forex-trading-indicators/t3-moving-average-indicator/
investopedia.com/ask/answers/121814/what-double-exponential-moving-average-dema-formula-and-how-it-calculated.asp
stockfetcher.com/forums/Filter-Exchange/ALMA-Arnaud-Legoux-Moving-Average/143514
mql5.com/en/forum/173057
incrediblecharts.com/indicators/hull-moving-average.php
help.cqg.com/cqgic/default.htm
FRAMA (Ehlers true modified calculation)

Fractal Adaptive Moving Average

Variable Index Dynamic Average (VIDYA)

blastchart.com/Community/IndicatorGuide/Indicators/VIDYA.aspx
เอกสารเผยแพร่
As requested by maybach47
I have added 2 alert conditions for this script.
When HA MA changes color from a) red to green and b) green to red
almaAMADouble Exponential Moving Average (DEMA)Exponential Moving Average (EMA)heikin-ashiMoving AveragessmaT3 Moving Average (T3)Trend AnalysisVolatilityWeighted Moving Average (WMA)

สคริปต์โอเพนซอร์ซ

ด้วยเจตนารมณ์หลักของ TradingView ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถเข้าใจและตรวจสอบได้ ต้องขอบคุณผู้เขียน! ที่ให้คุณใช้ได้ฟรี แต่การนำโค้ดนี้ไปใช้ในการเผยแพร่ซ้ำจะต้องอยู่ภายใต้ กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?


และใน:

คำจำกัดสิทธิ์ความรับผิดชอบ