how to get current price?  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
zentenk
Posts: 2
Joined: 07 Mar 2014
Has thanked: 1 time

how to get current price?

Postby zentenk » 08 Mar 2014

I'm trying to retrieve the current close/ask/bid prices and I couldn't find anything searching around.

More specifically I want to know the current price at every tick update (IOG enabled). Poking around I figured it should be

Code: Select all

Bars.Close[0]
But can anyone confirm?

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

Re: how to get current price?  [SOLVED]

Postby JoshM » 08 Mar 2014

I'm trying to retrieve the current close/ask/bid prices and I couldn't find anything searching around.

Code: Select all

Bars.Close[0] or Bars.CloseValue
Bars.StatusLine.Ask
Bars.StatusLine.Bid
Also see the MultiCharts .NET programming guide.
More specifically I want to know the current price at every tick update (IOG enabled). Poking around I figured it should be

Code: Select all

Bars.Close[0]
But can anyone confirm?
In real-time: yes, with IOG `Bars.Close[0]` will give the most recent tick (or the closing price of the bar when called conditionally when `Bars.Status == EBarState.Close` equals true).

In back-testing: that depends on your Bar Magnifier settings. Also see How signals are calculated.


Return to “MultiCharts .NET”