TS 8.3 and or the servers have a bug. That bug causes Forex mini's to change to full contracts without warning. Therefore I have begun to look at writing into the EL code, that which is necessary to use the NT DLL.
I have to go this route over the email one, because there is no way within TS to control the trade size. I want to write the EL code to generate the trades in 8.3.
I copied the following and have tried various changes to it, in an effort to both produce signals on the TS chart and automated trades happen through NT without success.
Any help appreciated (or if you have a sample EL that generates both chart signals and trades) I would really appreciate it!!
Thanks
Don
{ Copyright (c) 2005, NinjaTrader LLC [email protected] }
inputs: FastLength(9), SlowLength(18) ;
variables: FastAvg(0), SlowAvg(0), Success(0);
if LastBarOnChart and NTConnected(1) then begin
if NTMarketPosition("") = 0 then begin
{ place an order, if there is no position yet }
if AverageFC(Close, FastLength) > AverageFC(Close, SlowLength) then begin
Success = NTBuyMarket("MyOrderId", 1); { buy 1 unit at market, assign order id (optionally) }
end else begin
Success = NTSellMarket("MyOrderId", 1); { sell 1 unit at market, assign order id (optionally) }
end;
end else begin
{ print some information on the current position and order }
Print("Position size: " + NumToStr(NTMarketPosition(""), 0));
Print("AvgEntryPrice: " + NumToStr(NTAvgEntryPrice(""), 2));
Print("OrderStatus: " + NTOrderStatus("MyOrderId"));
Print("Filled #: " + NumToStr(NTFilled("MyOrderId"), 0));
Print("AvgFillPrice: " + NumToStr(NTAvgFillPrice("MyOrderId"), 2));
end;
end;

Comment