# security free MTF example - JD

3057 views
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 .

Disclaimer.
I AM NOT A FINANCIAL ADVISOR.
THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY.
Open-source Skript

Ganz im Sinne von TradingView hat der Autor dieses Skripts es als Open-Source veröffentlicht, damit Trader es verstehen und überprüfen können. Ein Hoch auf den Autor! Sie können es kostenlos verwenden, aber die Wiederverwendung dieses Codes in einer Publikation unterliegt den Hausregeln. Sie können das Skript den Favoriten hinzufügen, um es auf dem Chart zu verwenden.

Möchten Sie dieses Skript auf einem Chart verwenden?
Disclaimer.
I AM NOT A FINANCIAL ADVISOR.
THESE IDEAS ARE NOT ADVICE AND ARE FOR EDUCATION PURPOSES ONLY.
JD.

You can contact me for info/access in PM or on Telegram: @jduyck
PLS, DON'T ASK FOR ACCESS IN THE COMMENT SECTION!

## Kommentare

Thank you! Will be very useful for me.
Antworten
EvoCrypto
@EvoCrypto, my pleasure!
Antworten
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!
Antworten
PineCoders
@PineCoders, thanks for the support!!

Gr, JD.
Antworten
is it possible to give the option for HA higher timeframe candles as well?
Antworten

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.
Antworten
Duyck
ok i see you cant add the proper syntax on here
Antworten
@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 + ha_close ) / 2

Gr, JD.
Antworten
Duyck
in the last statement those should be the previous values but square brackets don't seem to display correctly!!
Antworten
is it possible to give the open for HA higher timeframe candles as well?
Antworten
Profil Profileinstellungen Konto und Abrechnung Angeworbene Freunde Coins Meine Support Tickets Hilfe Center Private Nachrichten Chat Abmelden