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);

        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!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            648 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            369 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            108 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            572 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            574 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X