• 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

Looking for a boolean trading system

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

    Looking for a boolean trading system

    Hey guys does anyone have a boolean trading system not INDICATOR that they have created and are willing to post it here. I am having a super hard time coding my first boolean system. So what I am thinking is, I should use someone else's system and in the condition box just put in my code instead of yours.

    #2
    Hello wallsteetking,

    Thank you for your post.

    While I do not have or know of a boolean based trading system off-hand I can assist you here with your strategy. Can you give me an example of how you intend to use the booleans in your strategy? And/or are you looking for a better understanding of them first before implementing them?

    I look forward to your response.
    Patrick H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by wallsteetking View Post
      Hey guys does anyone have a boolean trading system not INDICATOR that they have created and are willing to post it here. I am having a super hard time coding my first boolean system. So what I am thinking is, I should use someone else's system and in the condition box just put in my code instead of yours.
      How do you mean "boolean trading sytem"? Are not all automated trading systems boolean? At its simplest,
      Code:
      if (EnterConditionMet) EnterTrade;
      if (ExitConditionMet) ExitTrade;
      No?

      Comment


        #4
        Originally posted by koganam View Post
        How do you mean "boolean trading sytem"? Are not all automated trading systems boolean? At its simplest,
        Code:
        if (EnterConditionMet) EnterTrade;
        if (ExitConditionMet) ExitTrade;
        No?
        You might find what he seeks here:

        https://www.bigmiketrading.com/ninja...-strategy.html

        Comment


          #5
          I am trying to make this strategy work.
          (http://www.ninjatrader.com/support/f...043#post339043)

          when two conditions are met that it takes a long. but my coding skills are horrible. I have attached the file that i am working on. But its not working correctly because it does not take a long when both the red and blue triangles are on the SAME bar.
          Attached Files

          Comment


            #6
            sledge I wrote that thread on big mikes site.

            Comment


              #7
              Hello wallsteetking,

              Thank you for your response.

              I have tested your strategy and it actually takes positions as expected. However, there are two items to take into consideration:

              First is that if the strategy is set the EntriesPerDirection = 1 then you will only see one entry per direction. Apply your strategy to your chart (for now ignore the triangles) > then right click in your chart > select Strategy Performance > MARSHALL > Historical Performance > Executions tab > then take a look at the most recent execution, it should be a buy that occurred earlier on your chart.

              The second item is the triangles, you have both set to the following tag: "My triangle up" + CurrentBar
              This will always be the same for both, please try the following to see both triangles at the same time:
              Code:
              			// Strategy 1
              			if (Bars.BarsSinceSession >=7)
              	        if (Stochastics(7, 14, 3).D[0] >= 30)
                          {
                              enterLongStrat1 = true;
              		//		enterLongStrat2 = false;
              				DrawTriangleUp("My triangle up red" + CurrentBar, true, 0, High[0] + 20 * TickSize, Color.Red);
                          }
              			
              			//Strategy 2
              			if (Bars.BarsSinceSession >=7)
              			if (Close[0] >= EMA(30)[0])
                          {
              				enterLongStrat2 = true;
                      // 		enterLongStrat1 = false;
              				DrawTriangleUp("My triangle up blue" + CurrentBar, true, 0, High[0] + 30 * TickSize, Color.Blue);
              			}
              For information on EntriesPerDirection please visit the following link: http://www.ninjatrader.com/support/h...rdirection.htm

              Please let me know if you have any questions.
              Patrick H.NinjaTrader Customer Service

              Comment


                #8
                PatrickH this is perfect thank you very much. YOUR ARE A KING!!!!

                Comment


                  #9
                  If my indicator has already the conditions to go long/short

                  How do you apply these 2 conditions (already declared as variables in the indicator code) using the strategy builder to go long or short:

                  private BoolSeries upDeviceSeries;
                  private BoolSeries downDeviceSeries;

                  I was using the strategy builder but I got stuck in the "conditions and actions > condition builder" section.

                  Thanks for your help,

                  Alan

                  Comment


                    #10
                    Futuros,

                    You would need to create these as public BoolSeries so that those values can be accessed outside of the indicator.

                    Edit: Only plots will show up in the Strategy Wizard. BoolSeries will need to be accessed directly using manual code.
                    Last edited by NinjaTrader_CalH; 08-15-2014, 02:58 PM.
                    Cal H.NinjaTrader Customer Service

                    Comment


                      #11
                      Originally posted by NinjaTrader_Cal View Post
                      Futuros,

                      You would need to create these as public BoolSeries so that those values can be accessed outside of the indicator.
                      They already are public BoolSeries:

                      "Finally, if anyone might want to use this in a strategy, I also put the device signals in a publicly accessible boolean series. Use UpDeviceSeries and DownDeviceSeries."

                      Comment


                        #12
                        Futuros,

                        I have updated my previous post as I found to be of error.

                        Only plots will show up in the Strategy Wizard. BoolSeries will need to be accessed directly using manual code.
                        Cal H.NinjaTrader Customer Service

                        Comment


                          #13
                          Originally posted by NinjaTrader_Cal View Post
                          Futuros,

                          I have updated my previous post as I found to be of error.

                          Only plots will show up in the Strategy Wizard. BoolSeries will need to be accessed directly using manual code.
                          do you have a sample boolean strategy that i can use?

                          Comment


                            #14
                            Futuros,

                            I do not have a sample for a strategy available for this.

                            I do have one available for the indicator and how they are created inside the script-

                            http://www.ninjatrader.com/support/f...ead.php?t=7299
                            Cal H.NinjaTrader Customer Service

                            Comment


                              #15
                              Originally posted by NinjaTrader_Cal View Post
                              Futuros,

                              I do not have a sample for a strategy available for this.

                              I do have one available for the indicator and how they are created inside the script-

                              http://www.ninjatrader.com/support/f...ead.php?t=7299
                              Thanks, but I already have the indicator which I want to turn into a trading system...

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by manueldecastro, Today, 12:57 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post manueldecastro  
                              Started by JulieG, Today, 12:40 AM
                              0 responses
                              5 views
                              0 likes
                              Last Post JulieG
                              by JulieG
                               
                              Started by jimjoe123, Yesterday, 09:28 PM
                              2 responses
                              13 views
                              0 likes
                              Last Post NinjaTrader_ChrisSch  
                              Started by 12VMan, 08-20-2019, 09:29 AM
                              2 responses
                              26 views
                              0 likes
                              Last Post Lancer
                              by Lancer
                               
                              Started by tgn55, Yesterday, 09:50 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post tgn55
                              by tgn55
                               
                              Working...
                              X