TradingView
Duyck
26 May 2020 13:47

security free MTF example - JD 

Bitcoin / TetherUSBinance

Açıklama

This script is not intended for trading purposes but gives some examples how you can get values
from previous candles in other timeframes, without using security calls.

NOTE: the "open", "high" and "low" values are calculated "on the fly", as the bar progresses,
the "close" is determined at the end of the timeframe, so it's only know at the first bar of the next time period



JD.

#NotTradingAdvice #DYOR

Disclaimer.
I AM NOT A FINANCIAL ADVISOR.
THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY.
ALWAYS DO YOUR OWN RESEARCH!
Yorumlar
PineCoders
This publication will be featured in our "Best Scripts of The Month" selection. Thank you for your valuable contribution to the TradingView community, and congrats!
Duyck
@PineCoders, thanks for the support!!
Glad if I can help!

Gr, JD.
EvoCrypto
Thank you! Will be very useful for me.
Duyck
@EvoCrypto, my pleasure!
TradeBuddy2019
is it possible to give the option for HA higher timeframe candles as well?
Duyck
@TradeBuddy2019

sure, in fact you can just use the ohlc values from this script and just calculate the Heikin Ashi values from there, using the standard Ha Calcs:

open = ( previous ha open + previous ha close ) / 2
high = max( open, close, high )
low = min( open, close, low )
close = ohlc4

Gr, JD.
TradeBuddy2019
ok i see you cant add the proper syntax on here
Duyck
@TradeBuddy2019, those are the values that you calculated for the open and close of the previous Heikin Ashi candles

so on the very first bar of the chart, these are going be just regular "open" and "close":

ha_open =( open + close ) / 2

on the next candle (and all the ones after that) this will be:

ha_open =( ha_open [ 1 ] + ha_close [ 1 ] ) / 2

Gr, JD.
Duyck
in the last statement those should be the previous values but square brackets don't seem to display correctly!!
TradeBuddy2019
is it possible to give the open for HA higher timeframe candles as well?
Daha Fazla