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.

    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:

        hey guys I need some help with my code. What I want to do is create a long entry when two of my systems both fire a long on the same bar. what i did is i created a boolean and put both of my strategies into one strategy called Mashall. however when i write the code, and run it.. does not work for some reason. can someone please help me decipher why this does not work. /// /// Enter the description of your strategy here /// [Description("Enter the description of your strategy here")] …

        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;
              				[B]DrawTriangleUp("My triangle up red" + CurrentBar, true, 0, High[0] + 20 * TickSize, Color.Red);[/B]
                          }
              			
              			//Strategy 2
              			if (Bars.BarsSinceSession >=7)
              			if (Close[0] >= EMA(30)[0])
                          {
              				enterLongStrat2 = true;
                      // 		enterLongStrat1 = false;
              				[B]DrawTriangleUp("My triangle up blue" + CurrentBar, true, 0, High[0] + 30 * TickSize, Color.Blue);[/B]
              			}
              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.

              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 WeyldFalcon, 08-07-2020, 06:13 AM
                              11 responses
                              1,422 views
                              0 likes
                              Last Post jculp
                              by jculp
                               
                              Started by RubenCazorla, Today, 09:07 AM
                              0 responses
                              4 views
                              0 likes
                              Last Post RubenCazorla  
                              Started by BarzTrading, Today, 07:25 AM
                              2 responses
                              29 views
                              1 like
                              Last Post BarzTrading  
                              Started by devatechnologies, 04-14-2024, 02:58 PM
                              3 responses
                              21 views
                              0 likes
                              Last Post NinjaTrader_BrandonH  
                              Started by tkaboris, Today, 08:01 AM
                              0 responses
                              6 views
                              0 likes
                              Last Post tkaboris  
                              Working...
                              X