people with nt,
regards.
i have had several issues trying to get nt to trade my strategies automated. nt insists that the strategy and the position in my account are in synchronization but that's just not the case.
in another inferior platform (ts), i was able to create a very simple strategy that would alternate between long and short positions if the bar number of the current bar could be exactly divided by 2 or not. i imagine such a strategy must also be easily achievable in nt but i have searched through the help guide and tried to use the strategy build tool without success. this kind of strategy is quite helpful when trying to determine whether orders are being correctly processed and sent or not.
the following fragment is an amalgamation of ninjascript and the structure of this strategy in the other platform:
if mod(currentbar,2)=0 and lastbaronchart and barstatus( 1 ) = 2 then { EnterShort(2, Convert.ToInt32(Psize), @"sp01"); } if mod(currentbar,2)=1 and lastbaronchart and barstatus( 1 ) = 2 then { EnterLong(2, Convert.ToInt32(Psize), @"lp01"); }
¿how would it be possible to get nt to generate long or short orders at the close of each bar depending on whether its bar number is divisible by 2 or not?
very well, thanks, regards.
Comment