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

Changed Pivot Indicator coding

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

    Changed Pivot Indicator coding

    Dear Sir, Please help me create a correct cs file as when I am trying to compile my cs file, NT7 is throwing error. Rghtly so, as I am unable to define some terms in right context. Ninjatrader 7 has a default Pivot indicator. I am trying to create a little deformed pivot indicator. Normal pivot point is sum of previous day high, low and close divided 3. And existing pivot indicator calculates R1 R2 R3 S1 S2 S3 on that basis and then draws respective lines. In my pivot, i am trying to use a different pivot point which is : sum of today's open and previous day's high, low and close divided by 4. And then drawing respective PP1 (say), R11 R21 R31 S11 S21 S31 ..... along with normal pivot lines. In my changed Cs I couldnot properly define today's open. Hence NT7 is throwing error. I dont have much understanding about NT7 program language and too dumb to make right changes. I am attaching here my changed Pivot cs file. I humbly request the seniors or more knowledgeable members to look at it and upload the correct file again. That would be very kind help.
    If it is not too much to ask, I want an another Pivot indicator, with PP= today's (open+high+low+close)/4 ... no previous day data. Of course this indicate will do On bar update and PP, resistance and support will change as the intraday session proceeds. it appears dumb to think about such pivot, but I seriously need this for some purpose. I would be greatly obliged for any help.
    Attached Files

    #2
    Hello ManuAdam,

    Thank you for your post.

    The error you receive is because you have not defined the variable 'todayOpen'.
    You will need to define this as a double in the Variables section of the code:
    Code:
    #region Variables
    private double todayOpen = 0;
    If you are looking to learn how to program your own custom indicators and strategies we have Premium Paid Educational events where you will join a NinjaScript expert for a pair of 6-8 hour long intensive courses designed to provide you with an in depth look at programming indicators and automated strategies through the use of NinjaScript:



    If you would like to take on learning NinjaScript on your own, 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://www.ninjatrader.com/support/h...stribution.htm

    I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript: http://www.ninjatrader.com/support/h..._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
    Click here to see our NinjaScript Tips

    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 indicators (100+) 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.

    If you have limited time or programming capabilities, you can discuss your requirements with any of our certified NinjaScript consultants.
    Click here for a list of certified NinjaScript Consultants

    Please let me know if I may be of further assistance.

    Comment


      #3
      Dear Sir, thanks for your quick reply. I very much appreciate it. I did add private double todayOpen = 0; now and defined the term properly. I also made some relevant additions for these new variables. Finally I was able to save and compile the script for indicator. BUT... it didnt work. I am still missing some important points, it seems.. as mypivots is still only drawing default PP and R&S lines and not my new PP1 and R!&S! lines series. Please help. I am attaching here my new changed cs file. Please look at it and upload the corrected on. I would be ever obliged for your precious time and effort.
      Attached Files

      Comment


        #4
        Hello ManuAdam,

        Thank you for your response.

        We do not provide custom programming or debugging services to our users. I can however assist you and point you in the right direction.

        The recent 'MyPivots1.cs' you posted is missing the todayLow and todayHigh declarations in the Variables section.
        Code:
        		private double todayHigh = 0;
        		private double todayLow = 0;
        Please let me know if this corrects the values of the indicator.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by f.saeidi, Today, 11:02 AM
        1 response
        2 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by geotrades1, Today, 10:02 AM
        4 responses
        12 views
        0 likes
        Last Post geotrades1  
        Started by rajendrasubedi2023, Today, 09:50 AM
        3 responses
        16 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by lorem, Today, 09:18 AM
        2 responses
        11 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by geddyisodin, Today, 05:20 AM
        4 responses
        30 views
        0 likes
        Last Post geddyisodin  
        Working...
        X