Multiple timeframes - Weird indicator issue

Questions about MultiCharts and user contributed studies.
masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Multiple timeframes - Weird indicator issue

Postby masber2000 » 29 Mar 2021

Hello-

I have an issue with an indicator that uses the secondary timeframe on a multiple timeframe chart. The chart has a 500 contract 3-line break chart as the primary, visible chart, and a 3000 contract bar chart that's hidden. The indicator's datapoints are being plotted in the chart but the datapoints that don't exactly match the timestamps of the primary timeframe are not being painted with the coded color. Please see the attached image.
Indicator in multiple timeframe chart.PNG
(12.87 KiB) Not downloaded yet
I've also attached an image of the indicator in a separate, single timeframe chart (3000 contract bar chart, similar time period), where the datapoints are being painted correctly.
Indicator in separate window.PNG
(4.43 KiB) Not downloaded yet
Any help on resolving this issue is much appreciated.

Thank you,

masber2000

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Multiple timeframes - Weird indicator issue

Postby Kate MultiCharts » 30 Mar 2021

Hello masber2000,

You can base the indicators calculation on different data series in the Format Indicator window -> Properties tab -> Base Study On.
More info about that setting in our Wiki.

masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Re: Multiple timeframes - Weird indicator issue

Postby masber2000 » 30 Mar 2021

Kate, thank you for your response. I already have the "Base study on" data correct - in fact, the indicator outputs are equal on both of the aforementioned charts. The only difference between the two charts is the color of the crosses in the image above..

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Multiple timeframes - Weird indicator issue

Postby Kate MultiCharts » 31 Mar 2021

masber2000,

This is the designed behaviour.
Indicator can only create plots on its base data series bars.
You may need to apply your indicator to Data1 and base the plot calculation on Data2. Most likely you’ll need to adjust the indicator’s script.

masber2000
Posts: 29
Joined: 15 Aug 2012
Has thanked: 2 times

Re: Multiple timeframes - Weird indicator issue

Postby masber2000 » 31 Mar 2021

Again, the plot is totally correct, there's nothing wrong with the indicator's calculations. I'm only inquiring about why the color of the plots only prints when aligned with data1. I'm happy with the calculations, but not the colors that don't print.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Multiple timeframes - Weird indicator issue

Postby TJ » 31 Mar 2021

Again, the plot is totally correct, there's nothing wrong with the indicator's calculations. I'm only inquiring about why the color of the plots only prints when aligned with data1. I'm happy with the calculations, but not the colors that don't print.
You need to write notes on the screen shot, with arrows pointing out to what is obviously wrong to you, but oblivous to the causual viewer.

DonDuck
Posts: 7
Joined: 01 Apr 2021

Re: Multiple timeframes - Weird indicator issue

Postby DonDuck » 20 Oct 2021

Hello masber2000,

You can base the indicators calculation on different data series in the Format Indicator window -> Properties tab -> Base Study On.
More info about that setting in our Wiki.
Kate, is there a way of performing this action within Powerlanguage? I am using two data series in the strategy and multiple indicators. Not all indicators have a "price" attribute to which BarsOfData(2).close (for example) can be applied.

Please advise.

User avatar
Kate MultiCharts
Posts: 575
Joined: 21 Oct 2020
Has thanked: 7 times
Been thanked: 144 times

Re: Multiple timeframes - Weird indicator issue

Postby Kate MultiCharts » 21 Oct 2021

Hi DonDuck,

No, there is no way to do so. The data series to base any indicator on can only be set as described in my post above. Referencing the second data series in the indicator's code is not obligatory.

DonDuck
Posts: 7
Joined: 01 Apr 2021

Re: Multiple timeframes - Weird indicator issue

Postby DonDuck » 21 Oct 2021

Hi DonDuck,

No, there is no way to do so. The data series to base any indicator on can only be set as described in my post above. Referencing the second data series in the indicator's code is not obligatory.
Kate,

Thank you for the response. I had scoured the documentation and just assumed I missed something.
I will continue to research/test a way to get the Heikin-Ashi (series-1) and Point (series-2) auto-strategy to work...

DonDuck


Return to “MultiCharts”