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

Buy/Sell signals

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

    Buy/Sell signals

    Can anyone help me code the following..... I want a red arrow to form when the following conditions are met...

    Sell signal...
    AND Stochastic[StocK,14,3,3,5] < 80
    AND CCI[CCI,20] < -20
    AND StochRSI[StochRSI,14] < 0.80
    AND Stochastic[StocD,14,3,3,5] > Stochastic[StocK,14,3,3,5]
    AND RSI[RSI,14] < 50
    AND DirectionalMovement[+DI,14,14] < DirectionalMovement[-DI,14,14]+1) OR (Bar[Close,5] < Bar[Open,5]
    AND ChaikinMoneyFlow[CMF,14] < 0
    AND AccumulationDist[AD] < 0
    AND MACD[Diff,Close,12,26,9] < 0
    AND CCI[CCI,20] > 290)

    and a green arrow to form when the follow conditions are met

    Buy Signal...
    AND Stochastic[StocK,14,3,3,5] >= 20
    AND CCI[CCI,20] > 20
    AND StochRSI[StochRSI,14] >= 0.50
    AND (Stochastic[StocD,14,3,3,5]) < Stochastic[StocK,14,3,3,5]
    AND RSI[RSI,14] > 50
    AND DirectionalMovement[+DI,14,14] > DirectionalMovement[-DI,14,14]
    AND MACD[Diff,Close,12,26,9] > 0) OR (Bar[Close,5] > Bar[Open,5]
    AND ChaikinMoneyFlow[CMF,14] > 0
    AND AccumulationDist[AD] > 0
    AND MACD[Diff,Close,8,17,9] < 0
    AND CCI[CCI,20] < -290)


    The following was from specifically the 5min but would like it to work on all time durations. Any help would greatly be appreciated, thank you!
    Last edited by optiontrader; 04-15-2016, 03:02 PM.

    #2
    Hello,
    Thank you for your post.
    You can draw arrows through using the DrawArrowUp() and the DrawArrowDown() methods.
    Please see the following links on the DrawArrowUp() and the DrawArrowDown() methods.

    Please let us know if you have any questions on these methods.
    Cody B.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your reply. Unfortunately, I have no idea how to code. Where can I start?

      Comment


        #4
        Hello,
        If you would like to take on learning NinjaScript, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts. A link to our Help Guide can be found below:*http://ninjatrader.com/support/helpGuides/nt7/
        I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:*http://ninjatrader.com/support/helpG..._resources.htm
        You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies: Click here to see our NinjaScript Reference Samples:http://ninjatrader.com/support/forum...splay.php?f=30 Click here to see our NinjaScript Tips:*http://ninjatrader.com/support/forum...ead.php?t=3229
        These samples can be downloaded, installed and modified from NinjaTrader and hopefully serve as a good base for your custom works.
        There is a also a growing library of user submitted custom strategies, indicators, and addons*that can be downloaded from our support form. Please look in the NinjaScript File Sharing section of our support forum as you may find what you are looking for there:*http://ninjatrader.com/support/forum...splay.php?f=37
        If you have limited time or programming capabilities, we do have partners through our partner affiliate that may be able to create this for you. Please let me know if you would like to get in touch with one of them.*
        Please let me know if you have any questions.
        Cody B.NinjaTrader Customer Service

        Comment


          #5
          Thank you for all of the information! Still if anyone is willing to help me speed up the process, I will greatly appreciate it. Thank you all.

          Comment


            #6
            Trying to learn how to code on NinjaTrader is quite the challenge...bump....

            Comment


              #7
              Looking for help bump

              Comment


                #8
                Originally posted by optiontrader View Post
                Trying to learn how to code on NinjaTrader is quite the challenge...bump....
                Use the Strategy Wizard. There is nothing that you have described in there that it cannot do.

                Comment


                  #9
                  Thank you for that....there seems to be way more information available to build a strategy but what I am trying to build is an indicator to show red arrows and green arrow. I was able to build a strategy very quickly and with ease but can not seem to find a way to build my indicator with the indicator settings. The strategy building wizards is easy due to all you having to input is the actual indicators and setting but have no idea about using the indicator wizard....any help?

                  Comment


                    #10
                    This is what I have so far....any help would greatly be appreciated as I do not understand the errors....TIA Also....Am I heading in the right direction? I don't really understand any of it lol
                    Attached Files

                    Comment


                      #11
                      Hello,
                      From what you have described you are wanting to do I do not believe working with a data series would be the right direction.
                      If you are wanting a green arrow drawn when one set of conditions is true and a red arrow drawn when the other conditions are true you will do something to the nature of the following:

                      Code:
                      if(//ConditionSet1GoesHere)
                      {
                          //SellSignalRedArrow
                          DrawArrowDown("myRedArrow" + CurrentBar, true, 0, Close[0], Color.Red);
                      }
                      if(//ConditionSet2GoesHere)
                      {
                          //SellSignalRedArrow
                          DrawArrowUP("myGreenArrow" + CurrentBar, true, 0, Close[0], Color.Green);
                      }
                      Cody B.NinjaTrader Customer Service

                      Comment


                        #12
                        Thank you so much. Great information to know. Love the help I am getting from this community! I will tackle it again later tonight! I really do appreciate the response.

                        Comment


                          #13
                          Ok so FINALLY I am seeing some results....completely wrong results....but results nonetheless. Any idea why I am getting the follow? Also, How would I code for the following condition: if the close from 5 bars ago is less than the open from 5 bars ago
                          Attached Files
                          Last edited by optiontrader; 04-19-2016, 08:54 PM.

                          Comment


                            #14
                            Originally posted by optiontrader View Post
                            ... Also, How would I code for the following condition: if the close from 5 bars ago is less than the open from 5 bars ago
                            Code:
                            if (Close[5] < Open[5])
                            {
                            //what gives
                            }

                            Comment


                              #15
                              Originally posted by optiontrader View Post
                              Thank you for your reply. Unfortunately, I have no idea how to code. Where can I start?
                              Work through the examples in the help? Maybe something will click with studying code in the indicator/strategy section here?


                              There is a NT partner that has an online book if you like books.

                              NinjaScript C# programming tutorial ebook available on Smashwords.com



                              There are a lot of indicators in the forums folder you might be able to put 2+2 together?

                              YOu might try bloodhound?



                              I watched a video or 2, but never went further since I know how to code.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Option Whisperer, Today, 09:55 AM
                              1 response
                              11 views
                              0 likes
                              Last Post bltdavid  
                              Started by port119, Today, 02:43 PM
                              0 responses
                              1 view
                              0 likes
                              Last Post port119
                              by port119
                               
                              Started by Philippe56140, Today, 02:35 PM
                              0 responses
                              3 views
                              0 likes
                              Last Post Philippe56140  
                              Started by 00nevest, Today, 02:27 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post 00nevest  
                              Started by Jonafare, 12-06-2012, 03:48 PM
                              5 responses
                              3,986 views
                              0 likes
                              Last Post rene69851  
                              Working...
                              X