Getting the Current Bid or Ask off the Live market

Questions about MultiCharts .NET and user contributed studies.
dverschoor
Posts: 4
Joined: 13 Jun 2013

Getting the Current Bid or Ask off the Live market

Postby dverschoor » 27 Aug 2013

Using Multicharts.NEt
I am using say 1/2 hour bars and want to access the current bid or offer in sending a stop limit order eg:

indicator_LE.Send(DOMPrice.Ask[0].Price+1);

To send the order at the market limit

now I tried Bars.Dom.Ask[0].Price+1 also but it gives me an error

Is there a way to get the Ask

The main data window I have is only last trade

Also I don't know how to access multiple secondary data points which I don't care about if there is a way to get the above working

Appreciate your help

Regards

David

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

Re: Getting the Current Bid or Ask off the Live market

Postby Henry MultiСharts » 28 Aug 2013

Hello David,

Instead of accessing the DOM it is easier to access the status line to get the current Ask and Bid values:

Code: Select all

Bars.StatusLine.Ask
Bars.StatusLine.Bid
To reference data from a subchart (ex. current close from second data series):

Code: Select all

BarsOfData(2).Close
How to add a subchart.

dverschoor
Posts: 4
Joined: 13 Jun 2013

Re: Getting the Current Bid or Ask off the Live market

Postby dverschoor » 28 Aug 2013

Hey this is useful
Thank you.

Can i ask do you have a sample trading system that tracks real time to put on a spread order / quoting type system ?

An example will be a pairs trading system

Thanks again.

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

Re: Getting the Current Bid or Ask off the Live market

Postby Henry MultiСharts » 28 Aug 2013

In MultiCharts .Net there are two approaches for order generation: managed and umanaged orders.

Managed orders are monitored by the strategy. Strategy can be trading only one instrument that is the main data series of your chart.
If you want to trade multiple instruments from the same signal - you need to use unmanaged orders. The symbols don't need to be on the chart, but you are responsible for managing your orders if you are using this approach. Here is an example of how to use the TradeManager.
For more information please refer to .Net programming guide: Extended Trading Possibilities. TradeManager:1, 2, 3, 4.


Return to “MultiCharts .NET”