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 Hwop38, 05-04-2026, 07:02 PM
            0 responses
            161 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Started by CaptainJack, 04-24-2026, 11:07 PM
            0 responses
            310 views
            0 likes
            Last Post CaptainJack  
            Started by Mindset, 04-21-2026, 06:46 AM
            0 responses
            245 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            349 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            179 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Working...
            X