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

Multiple Entry Names in Exit Order

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

    Multiple Entry Names in Exit Order

    with conditions True of course to trigger an Exit order can you have multiple Entry Signal Names

    ExitLong(Position.Quantity,@Exit Long",@Buy Long Cross");
    ExitLong(Position.Quantity,@Exit Long",@Buy Long RBI");
    ExitLong(Position.Quantity,@Exit Long",@Buy Long R2");

    all in the same strategy tab

    I am also having occassional Short positions created by an Exit Long order when there was NOT a Long to exit

    Will using Long Entry Signal Name as above eliminate that issue

    Thanks

    #2
    Hello DTSSTS,

    With EntriesPerDirection set to 3 or EntryHandling set to UniqueEntries I would expect these to be separate. The order methods may be called due to the logic in the script.

    Can you provide output from TraceOrders and prints to see when orders are being submitted and if orders are being automatically cancelled or ignored?

    Below is a link to a forum post that demonstrates using prints and TraceOrders to understand behavior.


    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      CAN I DO ALL OF THE BELOW in 1 tab action area

      ExitLong(Position.Quantity,@Exit Long",@Buy Long Cross");
      ExitLong(Position.Quantity,@Exit Long",@Buy Long RBI");
      ExitLong(Position.Quantity,@Exit Long",@Buy Long R2");

      all in the same strategy tab

      IF I CAN DO ALL THOSE ACTIONS, THEN i would think the Exit Long Orders causing a short position to be created would be eliminated if those order can only be send to match the Entrysignal name

      I will start using Entry Handling set to UniqueEntries (i have not done that)

      I cannot use Trace orders OVER MY HEAD, sorry try many times, with your help as well

      Comment


        #4
        Hello DTSSTS,

        Yes, you can use different signal names in the same tab as long as the EntriesPerDirection allows.

        Understanding how to use TraceOrders and Print() is vital.

        If you are not able to use these, stop what you are doing and devote all of your attention to understanding these tools until you understand.

        If you need assistance opening the NinjaScript Output window or assistance with enabling TraceOrders let me know and we can assist.

        Please confirm that you have watched all of the videos linked in that forum post multiple times.
        Last edited by NinjaTrader_ChelseaB; 07-05-2020, 05:44 PM.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          i have watch extensive videos, enable trade orders is no problem the Print statement or code or script however you refer to it is totally greek to me

          Thanks for the info

          Comment


            #6
            Hello DTSSTS,

            If this is greek to you, then this is where you need to start.

            My recommendation is that you do not continue until you learn how to use Print(). That is the single most important part of developing NinjaScripts (or programming in general) and is the last 20 minutes of the NinjaScript Editor 401 course because it is so important.

            Stop all development and learn to print.

            Try starting by printing:

            Print(Time[0]);

            Just like shown in the NinjaScript Editor 401 video.

            Do you see the time of the bar appearing in the output window?
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Barry Milan, Yesterday, 10:35 PM
            5 responses
            16 views
            0 likes
            Last Post NinjaTrader_Manfred  
            Started by DanielSanMartin, Yesterday, 02:37 PM
            2 responses
            13 views
            0 likes
            Last Post DanielSanMartin  
            Started by DJ888, 04-16-2024, 06:09 PM
            4 responses
            12 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by terofs, Today, 04:18 PM
            0 responses
            11 views
            0 likes
            Last Post terofs
            by terofs
             
            Started by nandhumca, Today, 03:41 PM
            0 responses
            8 views
            0 likes
            Last Post nandhumca  
            Working...
            X