Problem LastBarOnChart on MC 64bit

Questions about MultiCharts and user contributed studies.
rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Problem LastBarOnChart on MC 64bit

Postby rgranero » 25 Oct 2012

In Powerlanguage LastBarOnChart is not last bar plotted in Multichart (version 64 bit 8.0 build 5622).
This problem do not occours on 32bit version

Example:
Multichart end in date 10/24/2012
Powerlanguage
if LastBarOnChart then print (date);
Result:
1121023

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Problem LastBarOnChart on MC 64bit

Postby Henry MultiСharts » 25 Oct 2012

Your inquiry is being analyzed.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Problem LastBarOnChart on MC 64bit

Postby Henry MultiСharts » 25 Oct 2012

Daily resolution on end of day data on metastok format (in txt works). Then the last bar si closet (end of day data).
On the indicators with "Update on Every Tick" turned off and signals with IOG turned off LastBarOnChart will return True on the last closed bar.

In order to determine whether the bar is closed or open you can apply Custom 1 Line indicator with "Barstatus" as Formula input. If barstatus value is 2 then the bar is closed.

If the bar is considered to be closed but it is not then you need to check the session settings and reload the chart (Ctrl+R) after correct sessions are specified.

On the indicators with "Update on Every Tick" turned on and signals with IOG turned on LastBarOnChart will always return "True" on the last bar, disregard barstatus open or closed.

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: Problem LastBarOnChart on MC 64bit

Postby rgranero » 26 Oct 2012

Thank you for your quickly answer, I have made all your suggested settings and it seem all it work fine. How can I made same settings on backtester?

Regards
Riccardo Granero

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: Problem LastBarOnChart on MC 64bit

Postby rgranero » 26 Oct 2012

Solved.

Thanks to all MC staff thanks for their patience!

The problem was due to the setting IN QUOTEMANAGER / EXCAHNG & ECN'S setting. No from the 64 or 32 bit version!

Regards
Riccardo Granero

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Problem LastBarOnChart on MC 64bit

Postby Henry MultiСharts » 26 Oct 2012

Hello Ricardo,

Porfolio backtester works only with closed bars, it does not receive realtime tick data updates.
There is no Update on every tick option and no IOG mode in Porfolio Backtester. That means the scripts are always calculated only on the bar close.

User avatar
JoshM
Posts: 2195
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1544 times
Been thanked: 1565 times
Contact:

Re: Problem LastBarOnChart on MC 64bit

Postby JoshM » 08 Dec 2012

Hi Henry,
There is no Update on every tick option and no IOG mode in Porfolio Backtester. That means the scripts are always calculated only on the bar close.
Are there any plans to remove this limitation? I remember reading such about a Portfolio Backtester upgrade, with 'end of 2012' as estimate, but can't find it, so I might be mistaken here. :)

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Problem LastBarOnChart on MC 64bit

Postby Henry MultiСharts » 10 Dec 2012

Hi Henry,
There is no Update on every tick option and no IOG mode in Porfolio Backtester. That means the scripts are always calculated only on the bar close.
Are there any plans to remove this limitation? I remember reading such about a Portfolio Backtester upgrade, with 'end of 2012' as estimate, but can't find it, so I might be mistaken here. :)
Josh, we'll look into that next year with MultiCharts 9.0


Return to “MultiCharts”