• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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.
    https://ninjatrader.com/support/foru...121#post791121

    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 mcjosejavier, Today, 10:04 AM
            1 response
            6 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by odeifuor, Today, 09:05 AM
            1 response
            5 views
            0 likes
            Last Post NinjaTrader_Kate  
            Started by jhontorres, Today, 12:16 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Jesse  
            Started by KarstenKafl, 07-16-2020, 12:38 AM
            8 responses
            42 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by DieSlower, Yesterday, 11:02 PM
            1 response
            8 views
            0 likes
            Last Post NinjaTrader_Kate  
            Working...
            X