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

Josh: No buy signals in this strategy, why?

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

    Josh: No buy signals in this strategy, why?

    Josh, I am really puzzled. I have sent you the file by email, file is named BestES2Try, there are lots of sell signals but very few buy signals when there should be many. I just cannot understand. I think it has something to do with the "variable0==0 / varaible0=1 etc. Please look into it and tell me why there is a problem. Thanks.

    #2
    I do not believe I received your file. But you would want to just work through the simple case examples yourself. Start off with one order and take it one step at a time. In the conditions you want Variable0 == 0. In the action you want Variable0 = 1. In your next set you want Variable0 == 1 AND BarsSinceEntry() > 0 then do something.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thank you Josh. I think i am making some headway. Please tell me:

      I have created a strategy, 10 sets, from set one through 10 I will tell you how I have written the varaible. Please tell me if there is anything wrong.

      In Conditions In Actions

      Set 1: Varaible0==0 EnterLong Next Line: Varaible0 = 1
      Set 2: BarsSinceEntry()>0 EnterLong
      Set 3 & 4: same as above except EnterShort
      Sets 5,6,7: IN Conditions: Variable0==1,2,3
      In Actions: EnterLong Varaible0 = 1
      Sets 8,9,10: same as above except EnterShort.

      I felt there is no need to repeat teh BarsSince statement again.

      Is this all correct.

      Now, since there are only 10 sets, i was able to work it to 1,2,3. Is there anyway i can fit the 4th step also in the same sets or something or do i need to split the long and short strategy into two separate ones?

      Thanks.

      Comment


        #4
        ju1234,

        I cannot advise you on your complex scenario. In basic terms set1 is fine. Set2 needs to also include Variable0 == 1 in the condition as well as Variable1 == 0 and BarsSinceEntry(). Set2 action needs to include Variable1 = 1. Set3 needs to include Variable1 == 1 and Variable2 == 0 as well as BarsSinceEntry(). etc.

        At the end you will still need to unlock your code and change all of your BarsSinceEntry()s. Each sequential one needs to include the "fromEntrySignal". All of your entries need unique signal names and you need to tie each one to the correct BarsSinceEntry(). Then at the very end you need to reset all your Variable0, Variable1, etc. to 0.

        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Thank you Josh. It sounds too complex for me to try at this time.

          During my readings of various things in thiese forums, I saw somewhere written about something in the NT about "one order per signal". Are you aware of something that already existsw here about that?

          Comment


            #6
            Hi ju1234,

            Are talking about the EntriesPerDirection (Order Handling) setting when backtesting strategies?

            Please see this link - http://www.ninjatrader-support.com/H...AStrategy.html

            And this - http://www.ninjatrader-support.com/H...Direction.html
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Ok, here is something i thought. With the entries per direction technique: In the example that is givenin Guide, if we put EntreisPerDirection = 5. Then name the first entry as "Entry1". Is there a sttement i can put in the conditions for the next entry something like this: if entry1 is long wait till next signal to enterLong. And then same for enter2 and so on. Can you please translate this into a formula. Thanks.

              Comment


                #8
                Hi ju1234,

                Yes, your idea should be possible, pay close attention to the second example in this link then - http://www.ninjatrader-support.com/H...Direction.html

                You will need to use unique entry names and set the EntriesPerDirection to your number of entries for the complete strategy.
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by thumper57, Today, 04:30 PM
                0 responses
                4 views
                0 likes
                Last Post thumper57  
                Started by OllieFeraher, 05-09-2024, 11:14 AM
                5 responses
                16 views
                0 likes
                Last Post MisterTee  
                Started by jackiegils, Yesterday, 11:05 PM
                1 response
                11 views
                0 likes
                Last Post marcus2300  
                Started by Skifree, Today, 02:50 PM
                0 responses
                8 views
                0 likes
                Last Post Skifree
                by Skifree
                 
                Started by owen5819, Today, 02:24 PM
                1 response
                13 views
                0 likes
                Last Post owen5819  
                Working...
                X