Connecting MC data to NT

Questions about MultiCharts and user contributed studies.
momentum
Posts: 324
Joined: 23 Nov 2005
Has thanked: 9 times
Been thanked: 14 times

Connecting MC data to NT

Postby momentum » 25 Oct 2009

I have a great Market Profile application that I run in NT. NT can take data from TS by inserting a strategy on a chart:
{ Copyright (c) 2005, NT LLC NT@NT.com }
[IntrabarOrderGeneration = TRUE]

DefineDLLFunc: "NtDirect.dll", int, "Ask", lpstr, double, int;
DefineDLLFunc: "NtDirect.dll", int, "Bid", lpstr, double, int;
DefineDLLFunc: "NtDirect.dll", int, "Last", lpstr, double, int;
DefineDLLFunc: "NtDirect.dll", int, "SetUp", lpstr, int;

vars: intrabarpersist lastCurrentBar(-1),
intrabarpersist lastVolume(0),
vol(0);

{
{ "SetUp" needs to be called before the very first NT ATI call }
if CurrentBar = 1 then begin
SetUp("remote-machine-name-or-ip", 36973);
end;
}

if LastBarOnChart then begin
if lastCurrentBar <> CurrentBar then begin
vol = Volume;
lastVolume = 0;
end else begin
vol = Volume - lastVolume;
end;
lastCurrentBar = CurrentBar;
lastVolume = lastVolume + vol;

Ask(GetSymbolName, CurrentAsk, AskSize);
Bid(GetSymbolName, CurrentBid, BidSize);
Last(GetSymbolName, Close, vol);
end;

I would like to run this in MC so I can use my MP capabilities using data in MC. Problem is that MC does not recognise ASKSIZE and BIDSIZE.

Is there a work around?

Return to “MultiCharts”