Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Modify NBarsDown

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

    Modify NBarsDown

    Looking to modify NbarsDown.

    Currently the value is a Bar- but i am looking to make it a support line that I can use in a strategy.

    It reads:
    Value.Set(gotBars == true ? 1 : 0);

    I can change the return to return the first bar Open


    Value.Set(gotBars == true ? High[3] : 0);

    However I dont know of a way to re-code the indicator to remove the 0. AKA dont need IF true High[3], else 0. I need if true, High[3].


    Is there a simple way to to do this?

    I would love it to eventually look like this :

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


    TIA

    ***EDIT:

    Got close using this

    World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
    Last edited by wprosser; 10-14-2011, 08:47 AM.

    #2
    Hi wprosser,

    It sounds like you want an if statement here.

    if (gotBars)
    Value.Set(High[3]);
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thank your very much- just figured that out.

      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.


      Is there a way to extend the dot by 5 more bars? and only 5 bars?

      TIA

      Comment


        #4
        Unfortunately not a simple change I could think of that would extend the dots by 5 bars. You would likely need to make some changes to that for loop or start over and build the expression from scratch based on what you want to see.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Cool beans. Thanks for your help.

          maybe use a CrossAbove with an offsetting look back in my strategy code.....

          Thanks again Ryan for your timely response

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by sjsj2732, 03-23-2026, 04:31 AM
          0 responses
          43 views
          0 likes
          Last Post sjsj2732  
          Started by NullPointStrategies, 03-13-2026, 05:17 AM
          0 responses
          295 views
          0 likes
          Last Post NullPointStrategies  
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          290 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          135 views
          1 like
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          98 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Working...
          X