How To Build Multi Time Frame(MTF) Indicator in Pine Script



How To Build Multi Time Frame(MTF) Indicator in Pine Script



    Building a Multi-Time Frame (MTF) indicator in Pine Script allows traders to analyze multiple time frames on a single chart. This guide will explain how to develop an MTF indicator in Pine Script, enabling you to gain deeper insights into market trends and make more informed trading decisions.

Sample Code :-

// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © subhajitbhattacharya

//@version=5
indicator("MTF RSI")

rs = input.source(close,title="RSI Source")
rl = input.int(14,title="RSI Length")
rsi = ta.rsi(rs,rl)
rsi1 = request.security(syminfo.tickerid, "15", rsi, barmerge.gaps_off, barmerge.lookahead_on)
rsi2 = request.security(syminfo.tickerid, "60", rsi, barmerge.gaps_off, barmerge.lookahead_on)


plot(rsi,color=color.lime)
plot(rsi1,color=color.red)
plot(rsi2,color=color.blue)


Video Tutorial :-





Comments

Popular posts from this blog

How to develop Screener in Pine Script TradingView

Import Chartink data into Python

Import Nifty Option Chain With Python