I use the ATI to place and manage stops for positions initialised manually in the DOME. I trade a live account and would also like to use the ATI to manage positions in a sim account while I am also trading live. However the NTMarketposition command does not appear to work correctly.
For example if I open four different sim account Domes Sim101,Sim102,Sim13 and Sim MP, set the default account in NT for ATI to be Sim MP and then open 1 contract long positions in all four sim accounts. The following code outputs the test results below;
inputs:
int PlotValues(1);
variables:
intrabarpersist NTOpenPosition (0), intrabarpersist NTOpenPosVAL (0),
// This is for debugging purposes, set plotValues = 0 to stop plotting or any other value to plot.
if plotValues <> 0 then begin
ClearPrintLog;
print("NTOpenPosVAL Sim101: " + NumToStr(NTMarketPosition("Sim101"), 0));
print("NTOpenPosVAL Sim102: " + NumToStr(NTMarketPosition("Sim102"), 0));
print("NTOpenPosVAL Sim103: " + NumToStr(NTMarketPosition("Sim13"), 0));
print("NTOpenPosVAL SIM MP: " + NumToStr(NTMarketPosition("SIM MP"), 0));
print("NTOpenPosVAL Def ACC: " + NumToStr(NTMarketPosition(""), 0));
end; //for if plotValues <> 0
Print Log output;
NTOpenPosVAL Sim101: 0
NTOpenPosVAL Sim102: 0
NTOpenPosVAL Sim13: 0
NTOpenPosVAL Sim MP: 1
NTOpenPosVAL Def ACC: 1
Please advise.
Thanks
Kevin.
Comment