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 Entrypoints

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

    Multiple Entrypoints

    Dear Cservice,

    On my strategy I have 3 entyrules which each have a hitratio of above 50 procent. I tested this by bypassing 2 rules and checking each of the entry rule. Yet combined the system has hitratio that is less then 50 procent.

    My only explenation was that one entryrule bypasses the other because the system only takes 1 entry. But with 3 entries per directions is only changes the money made.

    So my question is, how can get my system to take each entry and is it possible to use multiple rules as confirmation. If possible, were can I read this or how do I do this?

    Thank you,

    #2
    Hi Robert87,

    Yes, it is possible to place multiple entry orders in a direction by increasing the EntriesPerDirection parameter in the Strategy window.

    By setting this to 3, 3 long entries will be allowed at the same time, or 3 short entries will be allowed at the same time.

    Are you finding that with TraceOrders set to true, there are prints in the Output window that show orders are being ignored?

    Also, keep in mind if EntriesPerDirection is changed in the code, you will need to remove the active instance of the script and add a new instance for that change to be effective.

    When you mention "is it possible to use multiple rules as confirmation", I am not certain what you are asking.
    Are you asking if it is possible to write multiple conditions into an if statement?
    Yes, you can add as many conditions to an if statement as you would like.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Tank you for your fast reply.

      I don't know where the traceorder is. But I checked the rules 1 by 1 and the make more trades then when I use the system combined. So yes, about 30 trades are ignored.

      As for my confirmation question I ment that I have 3 separate entryrules. If 1 rule is triggered and on a later moment a second rule is triggered aswell, I would like to use is as a confirmation. When confirmed I would like the system to do something. For example a bigger entry with more contracts.

      Kind regards,

      Comment


        #4
        Hello Robert87,

        The TraceOrders will have a message telling you why an order was ignored.

        If you have EntriesPerDirection set to 3, you will not be able to enter 30 trades in a direction, you will only be able to enter 3 trades in a direction.

        To use TraceOrders set TraceOrders = true; in the Initialize() method of the script. Then open the Output Window (Tools -> Output Window...) and then re-run the script.

        Below is a link to TraceOrders which is used to track when orders are being submitted.
        http://ninjatrader.com/support/helpG...raceorders.htm

        When you mention "But I checked the rules 1 by 1 and the make more trades then when I use the system combined." I am not quite sure what this means.

        Are you saying you have added prints to your conditions with timestamps and you are finding that the prints are appearing so you know for sure that the entry is being triggered?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Thank you.
          I will add the command to the script.

          I found out the it ignored when testing the hitratio of the 3 entry rules. I did this by blocking out 2 rules in the script with // to check the hitratio of the rules separately. I found that:
          rule 1 hitratio 53,57% with 28 trades in total
          rule 2 hitratio 52,07% with 121 trades in total
          rule 3 hitratio 52,505 with 40 trades in total

          Combined it should have hitratio > 50% and make 189 trades. Yet the system drops down to 45% and makes 131 trades in total. I did not change anything else.

          Comment


            #6
            Hello Robert87,

            I am uncertain how you are calculating the hit ratio as this is not a statistic that is reported by NinjaTrader. In NinjaTrader you can view the ratio of the avg win vs the avg loss.
            Am not aware of hit ratio that will appear in the performance results.

            The Ratio of avg win / avg loss will fluctuate based on the number of winners and losers and will not accurately let you know if trades are being ignored.

            Also, I would not use this hit ratio calculation to find out if trades are being ignored.
            If you want to know if trades are being ignored, add TraceOrders = true; to the Initialize() method of the script, open the Output window, and re-run the script. If orders are being ignored, there will be a message in the Output window that orders are being ignored.

            If you want your strategy to take every trade that the conditions are true for, then you need to set the Entries per direction to highest number of simultaneous trades that will be made.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            1 view
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,770 views
            0 likes
            Last Post Leafcutter  
            Started by Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            31 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            944 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            11 views
            0 likes
            Last Post Max238
            by Max238
             
            Working...
            X