Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Plot indicator on chart with different candle setup but same timeframe

I have 2 charts showing Nasdaq 100 E-mini Futures at 1 min intervals, one uses regular OHLC candles and the other uses Heikin Ashi.

I have written a very simple indicator that plots either shape.triangleup or shape.triangledown on certain candles on the Heikin Ashi chart using its OHLC data and would like to show these on the regular candle chart that is using the same timeframe to use in a seperate indicator/strategy, is this possible?.

Seems like it should be quite simple to do but I cannot find anything online showing me a way to do this, hopefully I am just using the wrong search terms.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

ticker.heikinashi will create a ticker for the Heikin Ashi bar values. You can then use the request.security() function with this ticker id.

//@version=5
indicator("ticker.heikinashi", overlay=true) 
heikinashi_close = request.security(ticker.heikinashi(syminfo.tickerid), timeframe.period, close)

heikinashi_aapl_60_close = request.security(ticker.heikinashi("AAPL"), "60", close)
plot(heikinashi_close)
plot(heikinashi_aapl_60_close)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading