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

CCI and moving average alert indicator request

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

    CCI and moving average alert indicator request

    Hi,

    I need help finding an ALERT indicator for the following conditions

    Buy alert (both conditions must meet)

    1. CCI -100

    2. Price above 200 simple moving average



    Sell alert (both conditions must meet)

    1. CCI +100

    2. Price below 200 simple moving average



    Can anyone please guide me to an indicator to something like above or something i can change around. Better yet can anyone try to code it for me, that will be a great help.

    Thanks in advance

    #2
    Hello yusaf,

    Thanks for opening the thread.

    I don't know of a specific indicator that can accomplish this task for you, but I can share some insight on how you can create the code yourself.

    The Strategy Builder is a useful tool for building simple strategies and simple logic without programming the NinjaScript by hand. I've created a demonstration video showing how you can create this logic in the Strategy Builder. This will run as a strategy. You can click view code and apply the necessary NinjaScript code to an indicator if you wish to create this in the context of an indicator.

    Demo: https://www.screencast.com/t/pCbqLjhsi

    A recorded webinar on using the Strategy Builder can be found here: https://www.youtube.com/watch?v=HCyt90GAs9k

    Additionally, we can have a member of our Business Development team reach out with additional information on NinjaScript Consultants who would be happy to write this script or any others at your request.

    Please let us know if we may be of further assistance.
    JimNinjaTrader Customer Service

    Comment


      #3
      Hi Jim,

      Thanks a bunch for a prompt response and making the video specially for my request. I will give it a go and see if it will do the job.

      Comment


        #4
        Originally posted by NinjaTrader_Jim View Post
        Hello yusaf,

        Thanks for opening the thread.

        I don't know of a specific indicator that can accomplish this task for you, but I can share some insight on how you can create the code yourself.

        The Strategy Builder is a useful tool for building simple strategies and simple logic without programming the NinjaScript by hand. I've created a demonstration video showing how you can create this logic in the Strategy Builder. This will run as a strategy. You can click view code and apply the necessary NinjaScript code to an indicator if you wish to create this in the context of an indicator.

        Demo: https://www.screencast.com/t/pCbqLjhsi

        A recorded webinar on using the Strategy Builder can be found here: https://www.youtube.com/watch?v=HCyt90GAs9k

        Additionally, we can have a member of our Business Development team reach out with additional information on NinjaScript Consultants who would be happy to write this script or any others at your request.

        Please let us know if we may be of further assistance.
        Hi Jim,

        I have tried to use the strategy builder for this purpose but was too complicated. for example, trade management. I can see myself using it in the future but not for this purpose. I really could use an indicator where i get an alert or arrow up/down paint on the chart. can you send me a link to request an indicator for this.
        Thanks

        Comment


          #5
          P.S. I have tried the same setup as your video but that does not seem to take CCI into consideration even though i set the "if all conditions below are met". I dont know what I am missing here.

          Comment


            #6
            Hello yusaf,

            Thanks for writing back.

            While I had made the video surrounding what you had described, the logic may have to be tweaked to get your desired result.

            Logic can be verified by taking debugging steps to print out the values used in the strategy's conditions and actions as the strategy executes. For example, you can create a third Condition Set that does not have any conditions but has a Print for each value used to evaluate the conditions in the Condition Sets that do not appear to be working. This way, you can observe exactly what the strategy sees while it executes, and you will then know how to modify the logic appropriately.

            Another item to consider is if the NinjaScript is calculated On Bar Close or On Each Tick. On Bar Close will have to wait for the bar to complete before the logic is fired. On Each Tick will fire the logic with each iterating tick that builds a bar. (OnEachTick iterates for each realtime tick, and not historical ticks that take place before the time the NinjaScript is enabled.)

            I've included a documentation link on Calculate - https://ninjatrader.com/support/help...?calculate.htm

            I will see about having a member of the Business Development team provide additional information on Consultants that would be happy to make this at request.
            JimNinjaTrader Customer Service

            Comment


              #7
              Hello yusaf,

              This is Ryan L. from the NinjaTrader Ecosystem responding on behalf of my colleague Jim.

              You can search our extensive library of vendors who provide programming services through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more!

              You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third party services for NinjaTrader all pricing and support information will need to be obtained through the consultant.

              This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.

              Please let me know if you have any questions, concerns or if I can provide any further assistance by responding to this thread at your convenience.
              Ryan L.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by PaulMohn, Today, 12:36 PM
              2 responses
              16 views
              0 likes
              Last Post PaulMohn  
              Started by Conceptzx, 10-11-2022, 06:38 AM
              2 responses
              53 views
              0 likes
              Last Post PhillT
              by PhillT
               
              Started by Kaledus, Today, 01:29 PM
              0 responses
              3 views
              0 likes
              Last Post Kaledus
              by Kaledus
               
              Started by yertle, Yesterday, 08:38 AM
              8 responses
              37 views
              0 likes
              Last Post ryjoga
              by ryjoga
               
              Started by rdtdale, Today, 01:02 PM
              1 response
              6 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Working...
              X