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

Indicator ploted on CCI zero line

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

    #16
    Yeah...that worked.
    So far, So Good.
    Yes, I had the plots properly in the Properties region.

    Thanks for all your help.

    I have another issue to work out. But I will start a new thread for that.


    Thanks again.

    Comment


      #17
      Well, I will post this here because it has to do with the CCI zero line.

      For Condition1 I am trying to do this,
      If the "MACDEMA" (which is the same as the MACD smooth line) is above the zero line and rising, plot green to the zero line, and
      If the "MACDEMA" is above the zero line and falling, plot yellow to the zero line.

      If the "MACDEMA" is below the zero line and falling, plot red to the zero line, and If the "MACDEMA" is below the zero line and rising, plot yellow.

      I only use this MACDEMA because I dont know how to plot the MACD smooth line. It seems to work ok. If you know how to plot MACD smooth line..ok to use it instead.

      I added one new color plot "ZeroYellow"...maybe I need two yellows.

      I just tried starting with this to get something to work, but it wont work,
      I get the CS1502 error message...plus I dont know if I can use the ">" or "<" in this condition...I dont know.


      if (Rising(MACDEMA(9)[0]>0))ZeroGreen.Set(0); else ZeroYellow.Set(0); //Plot to Zero Line
      if (Falling(MACDEMA(9)[0]<0))ZeroRed.Set(0); else ZeroYellow.Set(0); //Plot to Zero Line

      Thanks

      Comment


        #18
        You need to break apart your () to see.

        (Falling(MACDEMA(9)[0]<0))

        Your condition should read

        Code:
        if (Falling(MACDEMA(9)) && MACDEMA(9)[0] < 0)
        Josh P.NinjaTrader Customer Service

        Comment


          #19
          Great! Got it.

          Thanks

          Comment


            #20
            Hi dwalls,
            may you post a picture of the thing you coded or maybee also the indicator?
            i think this hits my idea / problem of plotstyle i am working on here.
            Thanks
            max-td

            Comment


              #21
              Plot Draw Object on Indicator

              Does anyone know how I could plot a Draw Object: Arrow, Dot, Diamond etc. right on the CCI indicator itself (say in Panel 2) instead of the price panel (Panel 1) and on a price bar?
              Example:
              (OnBarUpdate)
              if (Condition, maybe other than CCI Condition)
              Plot a Dot above/below CCI bar (or plot a Draw Object/dot on zeroline)

              Could I edit this to CCI bar somehow?
              DrawDiamond("Up Diamond" + CurrentBar, 0, SMA(20)[0], Color.Blue);

              Also do I need something in (Initialize)?

              Thanks

              Comment


                #22
                You will want to set DrawOnPricePanel = false. That will push your draw objects to your indicator panel.
                Josh P.NinjaTrader Customer Service

                Comment


                  #23
                  Thanks Josh,
                  I know about the DrawOnPricePanel = false. Thanks
                  Is there anyway to plot this on the zeroline?
                  DrawDiamond("Up Diamond" + CurrentBar, 0, CCI(14)[0], Color.Blue);
                  This plots a Diamond at the close of the CCI bar value, which is great.
                  But, how can I plot this on the zeroline?
                  Do I maybe change the (+ CurrentBar) to something else?

                  Thanks

                  Comment


                    #24
                    You would do that by changing the y-value it is plotted on. Currently you are plotting on a y-value of CCI(14)[0] which is why you see it on your CCI bar. If you want it on zero change that to 0.

                    Code:
                    DrawDiamond("Up Diamond" + CurrentBar, true, 0, 0, Color.Blue);
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #25
                      Plot drawtext for price

                      Hello,
                      I would like to plot the price, on the price panel, at the point of a crossabove or crossbelow condition.
                      Example:
                      if (CrossAbove "condition")
                      Draw or plot the price at the point of crossabove to the price bar.
                      Do I use something like:

                      DrawText("CurrentPrice"+CurrentBar, "CurrentPrice", 0, High[0]+5* TickSize, Color.Red);

                      or how would I plot the price of the CrossAbove?

                      Thanks
                      Attached Files

                      Comment


                        #26
                        Not sure I follow. Isn't that what your picture is already showing?
                        Josh P.NinjaTrader Customer Service

                        Comment


                          #27
                          Thats just a picture to show you what I would like to do, but dont know how to do it...yet. I need some help.

                          Thanks

                          Comment


                            #28


                            Fill out the various parameters to what you want.
                            DrawText("CurrentPrice"+CurrentBar, Close[0].ToString(), 0, High[0]+5* TickSize, Color.Red);
                            Josh P.NinjaTrader Customer Service

                            Comment


                              #29
                              Josh,
                              Thanks for all your help.
                              I got it to work.


                              Thanks

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Rapine Heihei, 04-23-2024, 07:51 PM
                              2 responses
                              30 views
                              0 likes
                              Last Post Max238
                              by Max238
                               
                              Started by Shansen, 08-30-2019, 10:18 PM
                              24 responses
                              943 views
                              0 likes
                              Last Post spwizard  
                              Started by Max238, Today, 01:28 AM
                              0 responses
                              9 views
                              0 likes
                              Last Post Max238
                              by Max238
                               
                              Started by rocketman7, Today, 01:00 AM
                              0 responses
                              7 views
                              0 likes
                              Last Post rocketman7  
                              Started by wzgy0920, 04-20-2024, 06:09 PM
                              2 responses
                              28 views
                              0 likes
                              Last Post wzgy0920  
                              Working...
                              X