Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

will it cancel the stop/limit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    will it cancel the stop/limit

    With REVERSEPOSITION COMMAND, will it cancel the stop/limit entered along with the original trade (VIA a Ninja Strategy) ??

    IE: "TTS1"

    DefineDLLFunc: "NtDirect.dll", int, "Command", lpstr, lpstr, lpstr, lpstr, int, lpstr, double, double, lpstr, lpstr, lpstr, lpstr, lpstr;

    inputs: Quantity(1),MonthContract("ER2 12-07"), account("?????????");

    Vars: intrabarpersist mp(0), NTID(0);

    if LastBarOnChart and mp <> I_MarketPosition and NTConnected(1) then begin

    If mp = 0 and I_MarketPosition = -1 then
    NTID = Command("place" , account, MonthContract, "sell", Quantity, "MARKET",0,0, "DAY","","", "TTS1","");

    If mp = 0 and I_MarketPosition = 1 then
    NTID = Command("place" , account, MonthContract, "BUY", Quantity, "MARKET",0,0, "DAY","","", "TTL1","");

    If mp = 1 and I_MarketPosition = -1 then
    NTID = Command("REVERSEPOSITION" , account, MonthContract, "sell", Quantity, "MARKET",0,0, "DAY","","", "TTS1","");

    If mp = -1 and I_MarketPosition = 1 then
    NTID = Command("REVERSEPOSITION" , account, MonthContract, "BUY", Quantity, "MARKET",0,0, "DAY","","", "TTL1","");

    If t > 1400 and mp <> 0 and I_MarketPosition = 0 then
    NTID = Command("CLOSEPOSITION" , account, MonthContract,"",0,"",0,0,"","","","","");

    end;

    mp = I_MarketPosition;

    Plot1(mp);

    #2
    Any pending entry order of the strategy being reverersed will be cancelled.
    RayNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    111 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    158 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    78 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    125 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    79 views
    0 likes
    Last Post PaulMohn  
    Working...
    X