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

ExitLongLimit order with Signal Name

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

    ExitLongLimit order with Signal Name

    Hello!

    To enter Long positions with Limit orders using Quantity, Price and Signal Name
    I can use the following order

    Code:
    EnterLongLimit(int quantity, double price, string signalName);
    I wounder if there is a simmilar overload for the ExitLongLimit? I cannot find it. I would like to place the following order:

    Code:
    ExitLongLimit(int quantity, double limitPrice, string SignalName);
    But I can only place:

    Code:
    ExitLongLimit(int quantity, double limitPrice, string SignalName, string fromEntrySignal);
    and

    Code:
    ExitLongLimit(int quantity, double limitPrice, string fromEntrySignal);
    As a result I cannot identify the source of a sell Limit Order on the order page.

    My strategy creates lots of orders. For debugging purpose I need to identify which ExitLongLimit order was executed in a spefic situation. When I take a look at the Order Page all ExitLongLimit orders are identified as "sell" orders.

    Any ideas? Is there a possibility to customize the order type overloads?

    thx

    #2
    imported post

    Why can't you use?







    ExitLongLimit(int quantity, double limitPrice, string SignalName, string fromEntrySignal);
    When fromEntrySignal is the signal you provided in EnterLongLimit() ?

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Because I cannot be sure which entry signal created the current situation / the current amount of shares.

      Depending on the current situation different market entry ordersare created with a variable number of shares. Let's say if the market is above a yesterdays close+x buy 10 "buy_in_high", if it is in between close+10 and close-10 buy 3 "buy_in_mid" and if it is below close-10 buy 1 "buy_in_low". Then I buy an sell at certain levels ("buy_one_at_z", "sell_one_at_y", ... etc.). So a ExitLongLimit order could exit one shares of the position I initially bought to enter the market, or it could exitone shares Iadded later.

      Comment


        #4
        imported post

        I see.

        Try this, I believe it should work:

        ExitLongLimit(quantity, limitPrice, "MyExitName", string.empty);


        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          That works perfect, thanks for the tip.

          Nathamus



          PS: You have to write empty with capital E, otherwise it won't compile.

          Code:
          ExitLongLimit(quantity, limitPrice, "MyExitName", string.Empty);

          Comment


            #6
            imported post

            You correct, thanks for pointing it out.
            RayNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by FishTrade, Today, 03:42 PM
            0 responses
            1 view
            0 likes
            Last Post FishTrade  
            Started by Richozzy38, Today, 01:06 PM
            3 responses
            14 views
            0 likes
            Last Post Richozzy38  
            Started by ttrader23, Today, 09:04 AM
            2 responses
            12 views
            0 likes
            Last Post ttrader23  
            Started by geotrades1, Today, 07:54 AM
            10 responses
            26 views
            0 likes
            Last Post NinjaTrader_BrandonH  
            Started by ninza33, Yesterday, 12:31 PM
            3 responses
            16 views
            0 likes
            Last Post NinjaTrader_LuisH  
            Working...
            X