Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Please help for a good indicator

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

    Please help for a good indicator

    I have problems for my programming. The program is not a complicated case but I always have error message in the compiling step. I am new to Ninja and never did ninja programming before. Please help me to get the program. It is a very good indicator.
    A=EMA(Close, 3)[3];
    B=EMA(Close, 5);
    C=EMA(Close,15);
    There will be three plots in a individual chart: 1st one is the difference of A and B or ( EMA(Close, 3)[3]-EMA(Close, 5) ); 2nd one is the difference of A and C or (EMA(Close, 3)[3]-EMA(Close, 15);3rd one is the zero line.
    If B cross over A, that is a buy signal (using a shape up arrow for indication). If C cross over A, that is a sell signal (using a shape down arrow for indication).
    Thanks a lot!

    #2
    Hello,

    Post the body of the indicator code itself and we can give you pointers.
    A way to at least locate the error is to comment out parts of the code until it compiles. Then you know the last thing you commented out contains the error.
    DenNinjaTrader Customer Service

    Comment


      #3
      Ben, thanks for your information and help.
      Please check the code file I attached and correct the mistakes.
      I am a new user and had to write the codes by referring to some other Ninja trader files.
      Attached Files

      Comment


        #4
        mydream09, I would suggest using unique tag ID's for your two DrawArrow calls, if you use only one you only modify one arrow all the time your rules call for it...to do this easiest is too add CurrentBar to your chosen tag like

        Code:
        DrawArrowUp("tag1" + CurrentBar, true, 0, Low[0] - TickSize, Color.Green);
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand, thanks for your correction and I modified my file. Please give me more suggestions.

          Comment


            #6
            You're welcome - I'm not sure what you're looking for exactly. What result are you getting? What does work, what does not work? Which errors are you getting if any? Thanks!
            BertrandNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by kawalecld, Today, 12:21 PM
            0 responses
            2 views
            0 likes
            Last Post kawalecld  
            Started by farzibopsu, Today, 11:52 AM
            0 responses
            4 views
            0 likes
            Last Post farzibopsu  
            Started by exjayess, Today, 11:04 AM
            1 response
            9 views
            0 likes
            Last Post NinjaTrader_ShawnB  
            Started by robertlaub, Today, 11:11 AM
            2 responses
            4 views
            0 likes
            Last Post robertlaub  
            Started by sdauteuil, Today, 10:28 AM
            0 responses
            6 views
            0 likes
            Last Post sdauteuil  
            Working...
            X