Shifted indicators  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
chosenek
Posts: 26
Joined: 01 Mar 2015
Has thanked: 2 times

Shifted indicators

Postby chosenek » 05 Mar 2015

Hi,
why all indicators are shifted by 6 bars from left side of chart?
Also in code the bar with index 1 is actualy the bar on sixth position.

Tried several indicators/instruments.

Does anyone have a clue?
Attachments
Shifted indicators.png
(114.6 KiB) Downloaded 474 times

User avatar
Alex MultiCharts
Posts: 194
Joined: 09 Aug 2013
Has thanked: 43 times
Been thanked: 77 times

Re: Shifted indicators  [SOLVED]

Postby Alex MultiCharts » 05 Mar 2015

Hello chosenek,

Yes, it is expected as this is the MaxBarsBack offset of the Indicators.

• MaxBarsBack is the amount of bars that would be used for initial script calculation, to get the initial value of functions, variables. This amount of bars would be skipped, so you will see a first signal on maxbarsback+1 bar (for ex, may vary depending on the strategy).
• For signals - the minimum MaxBarsBack is the largest MaxBarsBack required by all signals applied to the chart. For ex. you have data1=1 min, data2=1 day. If an Average in your code references data2 with Length=10, then the required MaxBarsBack value is 10. 10 days of data will be skipped on both series. If your code does not reference additional data series then bars of data1 will be skipped only.
• For indicators - the minimum MaxBarsBack is the largest look back (Length) required for calculation in this indicator.
• Chart data range should be higher than MaxBarsBack value.
• If your MaxBarsBack value is not enough the study would not be calculated and will show an error message.
• If your MaxBarsBack is too high (more than the amount of bars on your chart) then the study will be waiting for the required amount of bars. On the chart you can see "Strategy calculating" message in such case or "Calculating" for an indicator.

Please follow this link to read more: http://www.tradingcode.net/multicharts- ... trategies/


Return to “MultiCharts .NET”