Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Slope Indicator with Enhaced Option

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

    #16
    Originally posted by NinjaTrader_Jesse View Post
    Hello,

    Thank you for the questions.

    The default color editor that comes up would be Web, I do not know of any supported ways to specify which color dialog comes up. An alternative would be to instead use a Custom color as the default instead of a Web color.

    In the script there is currently the line:

    Code:
    private Color colorDown = Color.Red;
    You could change this to

    Code:
    private Color colorDown = Color.FromArgb(255, Color.Red);
    which is the same color, but because FromArgb is used it is a "Custom" color so the Custom panel is selected when you open the color drop down.


    The Locked or Unlocked simply means that the file came with NinjaTrader or did not come with NinjaTrader. Any items that are locked or unlocked can be used from the script by calling its name.

    For example, if you wanted to use a SMA in the script, you would just use the syntax as follows to get its value from the Close price series:

    Code:
    double smaValue = SMA(12)[0];
    The previous file provided is using an ENUM to define the list you see in the indicators Properties which is named: InputSeriesType and you can locate this near the bottom of the file.

    Any additional items would need to be added into this enum, and then later used in the logic where needed.

    An example would be to find the enum InputSeriesType and locate the line "DEMA", now search the script for each occurrence of InputSeriesType.DEMA and you will see where in the script it is being used and how.

    This would allow you to "duplicate" the same logic with a different indicator that is not DEMA. What i mean is that if you wanted to add another MA(lets just call it SMA3) as a option, you would add SMA3 to the InputSeriesType enum and the look in the script for an example of how one of the other MA's has been coded and make your logic just like that.

    Additionally, Enum's are a C# concept that is not specific to NinjaTrader, this guide is of great value if any of these concepts are new to you: http://www.techotopia.com/index.php/C_Sharp_Essentials
    Specifically sections 5 - 11, also there is this documentation for Enum's https://msdn.microsoft.com/en-us/library/sbbt4032.aspx


    I look forward to being of further assistance.
    Hi Jesse,

    i added "ZeroLagTEMA" and "ZeroLagHATEMA" inicators(existing in the indicator list together with "DEMA" indicator etc..) into <InputSeriesType> DefaultInput, and then duplicated the same logic with the "DEMA" indicator there.

    Here are compile ERRORs, i am unable to solve this.

    Attachments are "ZerLagTEMA" and "ZeroLagHATEMA".

    Would you please help again.

    tysjnt
    Attached Files
    Last edited by tysjnt; 07-06-2015, 12:50 PM.

    Comment


      #17
      Hello,

      Thank you for the reply.

      Can you attach the revised version of the script you are working on? I can look into the syntax being used and see what the error is.

      I look forward to being of further assistance.
      JesseNinjaTrader Customer Service

      Comment


        #18
        Hi,

        Attached here the working revised version of the script.

        Errors: the name ' ADXMA_shanky_paint' does not exist in the current context.
        Code: CS0103 Line: 108 and 115 Column: 80

        Thanks.
        tysjnt
        Attached Files
        Last edited by tysjnt; 07-08-2015, 11:36 AM.

        Comment


          #19
          Hello,

          The error message listed means that ADXMA_shanky_paint does not exist where you are calling it. if this is a variable it is likely not defined.

          Can you tell me, is this error related to the 3 scripts posted or was this a separate question?

          If this is a separate question, double click on the error you see and it should take you to the general location and file where the error is so you can correct the issue.

          Otherwise, please double click the error and locate the file where this error is coming from, once you do you could upload that file so I can see where and how ADXMA_shanky_paint is being used.

          I look forward to being of further assistance.
          JesseNinjaTrader Customer Service

          Comment


            #20
            Hello,

            Not a separate question. That is the error i forgot to mention in the previous post #16 07-06-2015.

            Regards.
            tysjnt

            Comment


              #21
              Hello,

              I am unsure on this error as this did not occur on my end. This is likely being caused from a different script.

              Can you double click on the error message to see which script is opened when you do?

              The error is specifically regarding the use of the following syntax: ADXMA_shanky_paint

              Where ever that is located is what is throwing the error.

              I look forward to being of further assistance.
              JesseNinjaTrader Customer Service

              Comment


                #22
                Hi,

                i double clicked the error ( the same file attached in the post #18), then new window showed "Indicator -MADetrend_v1.This indicator is in the NT 6.5 page 10 of 17, i did not down load yet.

                If you see ZeroLagTEMA, AeroLagHATEMA,TIS in the attached file via post#18, it is the same file i clicked F5 compiled here now.

                Thanks.
                tysjnt

                Comment


                  #23
                  Hello,

                  I had imported all the files you have attached and do not get the message so it would not be located in these files.

                  If you would like help resolving that message on your end, please email me at platform support @ ninjatrader.com with the ticket number 1341478 and we can do a remote session to resolve the error.

                  Edit: I had misread, you stated that it is compiled now. If you do still need assistance the above message would still be relevant otherwise based on the final comment it seems this is solved?

                  I look forward to being of further assistance.
                  JesseNinjaTrader Customer Service

                  Comment


                    #24
                    Hello,

                    " It is compiled now" means: Whati did and see that error message .....Control Panel>Tools>Edit NinjaScript>Indicator................F5> Error messages.

                    In fact the attached file been created via Manage Attachments in the Reply to Thread, which is MS Visual Studio version. Even if this the difference result seeing the Error messages at your end and mine,
                    i don't know how to do next.

                    Pls advise.

                    tysjnt
                    .
                    Last edited by tysjnt; 07-09-2015, 12:40 PM.

                    Comment


                      #25
                      Hello,

                      I am unsure on your latest response.

                      Are you or are you not getting NinjaScript errors?

                      If you are getting an error in the NinjaScript editor, this is isolated on your end because I do not have this message when using any of the files you have provided. please email me per the prior posts instructions as I would need to assist you remotely to resolve this as the error and question are unclear.

                      I look forward to being of further assistance.
                      JesseNinjaTrader Customer Service

                      Comment


                        #26
                        Hi jesse.

                        Thank you. i believe that my original issue been solved already earlier. The error appeared after the compile was for a separate indicator. i realized later.

                        In fact i could not confirm the original problem solved because the 'SlopeEOp' is listed out from the chart indicators list, also the my workspaces, after the installation of the latest NT v.7.0.1000.29 ( not updated from the v.....27). However the indicator exist in the Edit Indicator list (i copied from the folder 'my document, NinjaTrader 7).

                        i tried to call those back into the current new v7.0.1000.29. i failed.
                        Again i need your help for this my critical problems now.

                        Thanks
                        tysjnt

                        Comment


                          #27
                          Hello,

                          Please send me an email at platform support @ ninjatrader.com and place a link to this thread in the body of the message.

                          I would like to just remote in if possible so I can see what error is actually happening, we can then take a look and resolve it.

                          I look forward to being of further assistance.
                          JesseNinjaTrader Customer Service

                          Comment


                            #28
                            SlopeEOp

                            Hello Jesse,

                            Thank you so much.
                            All the issues are RESOLVED perfectly.

                            Thanks AGAIN.
                            tysjnt

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by DJ888, Today, 10:57 PM
                            0 responses
                            1 view
                            0 likes
                            Last Post DJ888
                            by DJ888
                             
                            Started by MacDad, 02-25-2024, 11:48 PM
                            7 responses
                            158 views
                            0 likes
                            Last Post loganjarosz123  
                            Started by Belfortbucks, Today, 09:29 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post Belfortbucks  
                            Started by zstheorist, Today, 07:52 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post zstheorist  
                            Started by pmachiraju, 11-01-2023, 04:46 AM
                            8 responses
                            151 views
                            0 likes
                            Last Post rehmans
                            by rehmans
                             
                            Working...
                            X