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

Need help with this

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

    #16
    UltraNIX here you go!

    It's functional right now but there are a lot more optional moving parts to it.
    Attached Files
    Last edited by kaywai; 06-01-2022, 08:28 AM.

    Comment


      #17
      Tasker-182

      I hope the OP doesn't mind me posting here and if I may ask for any help.


      I applied the code you kindly posted in post 2 and example post 6 to reduce the number of arrows appearing at any one time (see attached image).

      ie: for say 10 MaxObjects then the oldest 10th arrow will be removed from the chart when a new arrow plots.

      However this only works when calculate is set to "on bar close".

      If I set calculate "on price change " or "on each tick" and when arrow (11) plots then all 10 arrows group together and plot on top of the latest arrow.


      If I hit F5 then the previous 10 arrows show again on their correct volume bars but again when a new latest arrow plots all the previous 10 arrows move on top of it.

      Hoping for some help

      Kind regards


      Here is my code:

      {
      if (CurrentBar < 1) return;

      if (Volume[0] > Volume[1])

      {

      Draw.ArrowUp(this, "MyArrowUp"+myCounter, true, 0, Volume[0]+P1, C5);
      myCounter++;

      if (myCounter >= MaxObjects)
      {
      myCounter = 0;
      }
      } ​
      When calculate is set to "on bar close" the number of arrows as per MaxObjects remains correct (ie: 10)

      Click image for larger version  Name:	Volume increasing over last bar with arrows.jpg Views:	0 Size:	14.2 KB ID:	1229784

      However when calculate is set to "on each tick" or "on price change" then all previous arrows move on top of the latest newest arrow (the black arrow has 10 arrows plotted on top of each other).

      Click image for larger version  Name:	Volume increasing over last bar with arrows-b.jpg Views:	0 Size:	15.3 KB ID:	1229785
      Last edited by dj22522; 01-04-2023, 08:15 PM.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by geddyisodin, Today, 05:20 AM
      0 responses
      2 views
      0 likes
      Last Post geddyisodin  
      Started by JonesJoker, 04-22-2024, 12:23 PM
      6 responses
      32 views
      0 likes
      Last Post JonesJoker  
      Started by GussJ, 03-04-2020, 03:11 PM
      12 responses
      3,239 views
      0 likes
      Last Post Leafcutter  
      Started by AveryFlynn, Today, 04:57 AM
      0 responses
      5 views
      0 likes
      Last Post AveryFlynn  
      Started by RubenCazorla, 08-30-2022, 06:36 AM
      3 responses
      79 views
      0 likes
      Last Post PaulMohn  
      Working...
      X