Managing codes with multiple resolution (time frame)

Questions about MultiCharts and user contributed studies.
gianluca71
Posts: 15
Joined: 22 Aug 2018
Has thanked: 2 times

Managing codes with multiple resolution (time frame)

Postby gianluca71 » 04 Sep 2018

Hi all,
I searched in the forum how to manage multiple resolution in the PL codes but I found in some past posts that MC doesn't do it.
Anyway I would know if these "issue" was solved in the last version 12 or how to do.
In my case I'd like translate 2 functions wrote in pinescript language (Tradingview) as following:

- change(time(tf)) Change function make the difference between current value and previous. In this case returns UNIX time of current bar for the specified resolution tf or NaN (not a value) if time point is not 'tf'.
- security(tickerid, tf, expression) Security function returns a value given from 'expression' at the time frame 'tf' for the symbol 'tickerid'.

I'm trying to translate the functions upon without using a multidata charts but I have some trouble, have anyone already solved the problem or have any ideas?
Thanks in advance, cheers

gianluca71
Posts: 15
Joined: 22 Aug 2018
Has thanked: 2 times

Re: Managing codes with multiple resolution (time frame)

Postby gianluca71 » 06 Sep 2018

Anybody can suggest something?
Thanks

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Managing codes with multiple resolution (time frame)

Postby ABC » 07 Sep 2018

Hi gianluca71,

Multicharts doesn't allow loading of other timeframes within the code. Therefore your best option will likely be using additional data streams on the chart. Alternatively you could look into computing the additional time frames out of the underlying chart time frame, but this might not always be possible (depending on the intervals you are using) and would take a bit of coding most likely.

Regards,

ABC


Return to “MultiCharts”