Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Unmanaged Trade - Profit taking, StopLimit, StopMarket

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

    Unmanaged Trade - Profit taking, StopLimit, StopMarket

    Hi -

    Can you please confirm I am using this function correctly for profit taking and stoplimit orders:

    // Go long
    ol = SubmitOrderUnmanaged(0, OrderAction.Buy, OrderType.Market, 3,0,0,"","Long_"+CurrentBar+"_1_");

    // Profit taking 4 pts above entry
    op = SubmitOrderUnmanaged(0, OrderAction.Sell, OrderType.Limit, 3, GetCurrentBid()+4, 0, "", orderNameProfit)

    // Market.StopLimit -- stop limit 2 ticks below entry
    os = SubmitOrderUnmanaged(0, OrderAction.Sell, OrderType.StopLimit, 3, GetCurrentBid()-0.5, GetCurrentBid()-0.5, "", orderNameStop)

    I've tested this and it appears to work as I've described above.

    How do I establish a Market.StopMarket order?

    Thank you!
    Last edited by bigsurftrader; 03-16-2017, 05:10 PM. Reason: Corrected some mistakes

    #2
    Hello Bigsurftrader,

    Thank you for your note.

    The following will submit a stop market order 5 ticks below the current bid.,
    Code:
    SubmitOrderUnmanaged(0, OrderAction.Sell, OrderType.StopMarket, 1, 0, GetCurrentBid()-5*TickSize, "", "Sell Stop");
    Please see the following link for SubmitOrderUnmanaged proper syntax.


    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by nicthe, Today, 09:24 AM
    1 response
    5 views
    0 likes
    Last Post nicthe
    by nicthe
     
    Started by samish18, Today, 10:13 AM
    0 responses
    3 views
    0 likes
    Last Post samish18  
    Started by kenz987, Yesterday, 10:20 AM
    2 responses
    13 views
    0 likes
    Last Post kenz987
    by kenz987
     
    Started by nicthe, 08-23-2023, 07:53 AM
    7 responses
    197 views
    0 likes
    Last Post nicthe
    by nicthe
     
    Started by stalt, 12-28-2015, 01:36 PM
    6 responses
    1,536 views
    0 likes
    Last Post giulyko00  
    Working...
    X