Empty Bars

Questions about MultiCharts and user contributed studies.
skyluck2001
Posts: 15
Joined: 16 Oct 2010
Has thanked: 1 time

Empty Bars

Postby skyluck2001 » 27 Oct 2011

Hi All,

How do I get MC to display the last traded price for a bar period that has no trade? My formulas that reference the last couple of bars fail to calculate if one or more of the referenced bar period is empty.

Thanks and best regards,
See KL

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

Re: Empty Bars

Postby JoshM » 29 Oct 2011

How do I get MC to display the last traded price for a bar period that has no trade? My formulas that reference the last couple of bars fail to calculate if one or more of the referenced bar period is empty.
Can you elaborate somewhat on what you want to achieve? Do you want to display the last price (i.e. Close, possible saved in a variable), or do you want to force the script to calculate (have you tried RecalcLastBarAfter()?), or do you mean something entirely else? :)

Regards,
Josh

skyluck2001
Posts: 15
Joined: 16 Oct 2010
Has thanked: 1 time

Re: Empty Bars

Postby skyluck2001 » 29 Oct 2011

Hi Josh,

I run a 5 second bar chart. In order to calculate the midpoint of a particular 1 minute period, I have a script that references the last 12 bars (5sec x 12 bars = 1min eg. (Highest(H,12)+Lowest(L,12))/2).

However, this script will fail to calculate if any of the 12 bars is empty (ie. no trade). If there are trades for all twelve bars, then there is no problem.

I wonder if it is possible to make MC display the last traded price instead of an empty bar for those bar periods that are empty.

Thanks for replying.

Best regards,
See KL

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

Re: Empty Bars

Postby Henry MultiСharts » 31 Oct 2011

Hello Sir.
Please let me know what do you understand as a bar with trade/without trade.
Please provide screenshots of such bars.

skyluck2001
Posts: 15
Joined: 16 Oct 2010
Has thanked: 1 time

Re: Empty Bars

Postby skyluck2001 » 31 Oct 2011

Hi Henry,

Please see attached screenshot. The bar periods below the black arrows are empty (no trade).

Best regards,
See KL
Attachments
09-281-crop.bmp
(1.43 MiB) Downloaded 511 times

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

Re: Empty Bars

Postby Henry MultiСharts » 01 Nov 2011

The empty period has no price. The script is not calculated on such empty periods.
The calculation will be performed on the previous traded bar.

skyluck2001
Posts: 15
Joined: 16 Oct 2010
Has thanked: 1 time

Re: Empty Bars

Postby skyluck2001 » 01 Nov 2011

Greetings,

Is it possible to display the last traded price for empty bars, instead of showing them as empty?

Best regards,
See KL

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

Re: Empty Bars

Postby Henry MultiСharts » 02 Nov 2011

Do you mean you want to dublicate the last traded bar replacing the empty period?

sptrader
Posts: 742
Joined: 09 Apr 2010
Location: Texas
Has thanked: 483 times
Been thanked: 274 times
Contact:

Re: Empty Bars

Postby sptrader » 02 Nov 2011

Greetings,

Is it possible to display the last traded price for empty bars, instead of showing them as empty?

Best regards,
See KL
***********************************************************************
** I think this is what you want-

"right mouse click" on the chart, then select ->Format window->X-time scale->Uncheck "Show empty periods".

skyluck2001
Posts: 15
Joined: 16 Oct 2010
Has thanked: 1 time

Re: Empty Bars

Postby skyluck2001 » 06 Nov 2011

Thanks.


Return to “MultiCharts”