MultiCharts and NT

Questions about MultiCharts and user contributed studies.
nolantx
Posts: 6
Joined: 15 Jan 2007

MultiCharts and NT

Postby nolantx » 13 Feb 2007

Has anybody got the NT functions to work? I must be doing someting wrong since no matter what I do, as soon as I load a workspace with a NT function, it totally hangs NT.

If someone has an example of code that defnintely works could you please post it so that I can compare the format.

Thanks.

nolantx
Posts: 6
Joined: 15 Jan 2007

Postby nolantx » 14 Feb 2007

Well, I'm replying to myself because I know this will be of interest to many. The NT functions DO work:

The problem I was experiencing:

If you do not have the "if LastBarOnChart" in your script, every order on your chart for as long as is loaded will be sent to NT at one time thus overloading it. This is mentioned once in the NT docs but not stressed enough.

Maybe we should keep this Topic open so we can share ideas and help others get up to speed.

widgetman
Posts: 81
Joined: 11 Oct 2005

Postby widgetman » 14 Feb 2007

Hi,
I figured out with a lot of effort that you can only fire orders off to NT when tick = 0. Otherwise you will get many orders sent out randomly depending on how long it takes NT to process the first order.

This allows a whole candle resolution for the current order to be processed by NT. Listed below is a loop example I have verified works. You will need to use a function to count down ticks of a candle. There are many examples on the TS forums. Hope it Helps


if (ticksremaining = 0) then
begin
// Send NT Order Command Here
end;

nolantx
Posts: 6
Joined: 15 Jan 2007

Postby nolantx » 14 Feb 2007

WidgetMan, does this mean that you can only send orders on BarCloseOnly?

widgetman
Posts: 81
Joined: 11 Oct 2005

Postby widgetman » 21 Feb 2007

Hi,
No I was able to send orders to NT any time I wanted. I created a indicator that sent orders based on a certain setup I was developing. The issue I found was NT allowed the easy language interface to send multiple orders before NT would respond. To correct this I only sent orders if tick = 0 and my condition was still valid. This meant I could not send another order until I had a full candle tick countdown again. This seemed to eliminate the issue for me, but when I reported it to NT Ray did not seem to interested in correcting his response time for incoming orders using the MKT_POSITION routine in the NT trader DLL interface. I eventually abandoned NT and wrote my own interface to IB. Now I hope to use MC interface very soon.

nolantx
Posts: 6
Joined: 15 Jan 2007

Postby nolantx » 21 Feb 2007

Thanks for the heads-up Widget. The IB Autotrading in MCharts fires off a market order on a trigger and not a limit order, is that correct to say?

User avatar
Kate
Posts: 758
Joined: 08 Dec 2006

Postby Kate » 26 Feb 2007

Yes, it is.


Return to “MultiCharts”