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

Woodies CCI

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

    Woodies CCI

    Hi
    We can find this indicator In ninjatrader 7.
    Can anybody help me with adding an arrows on the indicator ?
    Every time the CCI (etch of those two) crossing the +200 & -200 levels?

    Please see the pic attached

    Thank you
    Attached Files

    #2
    Hello Oferedry,

    Thanks for your post.

    To draw arrows you would use the DrawArrowUp() or DrawArrowDown() as needed.
    http://ninjatrader.com/support/helpG...rawarrowup.htm
    http://ninjatrader.com/support/helpG...warrowdown.htm

    For detection logic of the crossing, you can use CrossAbove() or CrossBelow()
    http://ninjatrader.com/support/helpG...crossabove.htm
    http://ninjatrader.com/support/helpG...crossbelow.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you!
      I tried to do that with an indicator
      I added this to the code:

      if (CrossAbove(DYNPrice, 68, 1) && (CrossAbove(DYNPrice, DYNSignal,1)&& CrossAbove(DYNPrice,Upper,1)) );
      DrawArrowUp("OferTagU", true, 0, High[0] + TickSize, Color.Red);
      if (CrossBelow(DYNPrice, 32, 1) && CrossBelow(DYNPrice, DYNSignal,1)&& CrossBelow(DYNPrice,Lower,1));
      DrawArrowUp("OferTagD", true, 0, Low[0] - TickSize, Color.Green);

      But instead arrows on the indicator, I got it's on the chart, and only once...(i need the arrows shows where it ever happened on the indicator panel
      Can you help me to correct it?

      Comment


        #4
        Hello Oferedry,

        Thanks for your post.

        By default all draw objects will appear on the price panel. To have your indicator draw objects (arrows) show in the indicator panel you will need to set DrawOnPricePanel = false; in initialize(). Please see: http://ninjatrader.com/support/helpG...pricepanel.htm

        From the NT7 helpguide regarding draw objects tag name: A user defined unique id used to reference the draw object. For example, if you pass in a value of "myTag", each time this tag is used, the same draw object is modified. If unique tags are used each time, a new draw object will be created each time.

        Your draw arrow statement has a tagname. The tag name is used to identify each draw object on the chart/panel. If you use the same tag name then only the very latest occurance of the draw object will appear. The function is to first see if a draw object of the same tag name exists, if so, it removes that object then draws the new object in the new location. To show all the arrows, each arrow will need a unique tagname. One easy way to do this is to add the CurrentBar number to the tag name. for example "OferTagU"+CurrrentBar will produce a tagname of OferTagU1006 on the arrow on the 1006th bar.

        examples:
        DrawArrowUp("OferTagU"+CurrentBar, true, 0, High[0] + TickSize, Color.Red);

        DrawArrowUp("OferTagD"+CurrentBar, true, 0, Low[0] - TickSize, Color.Green);
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          You are great!!!
          Thank you!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by GLFX005, Today, 03:23 AM
          0 responses
          1 view
          0 likes
          Last Post GLFX005
          by GLFX005
           
          Started by XXtrader, Yesterday, 11:30 PM
          2 responses
          11 views
          0 likes
          Last Post XXtrader  
          Started by Waxavi, Today, 02:10 AM
          0 responses
          6 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Started by TradeForge, Today, 02:09 AM
          0 responses
          14 views
          0 likes
          Last Post TradeForge  
          Started by Waxavi, Today, 02:00 AM
          0 responses
          3 views
          0 likes
          Last Post Waxavi
          by Waxavi
           
          Working...
          X