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

Ninjascript Help

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

    Ninjascript Help

    Hi,

    Can someone provide a script for the following :

    For the past 'n' bars (input parameter), need to find the bar with the logic - the high of the bar should be greater than or equal to the open and close of all the subsequent bars. Plot lines on the high of that bar and the low of that bar.

    Appreciate any help in this.

    #2
    Hello Kuvala,

    In the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners. This thread will remain open for any community members that would like to create this script as a conveneince to you.

    You can also contact one of our professional NinjaScript Consultants who would be eager to create or modify this script at your request or assist you with your script. Please let me know if you would like our business development follow up with you with a list of professional NinjaScript Consultants who would be happy to create this script or any others at your request.

    That said, I can provide guidance for you.

    So if you wanted to ensure the current high is greater than the high of all previous bars, there is a CurrentDayOHL() indicator that could provide this
    However, for specifically looking for the current bars high be greater than all previous bar's open and close (I am assuming in this session correct?), you would need to continuously update a value that has the highest open/close. On each new bar, if the open or the close is greater than the saved value, then save that open or close to the variable to hold this new highest open/close.
    Then you can compare this to the high of the bar on a new bar (before again saving that bar's open/close to the variable should the new bar exceed that value).

    You can draw a line using Draw.Line() or Draw.HorizontalLine().

    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by sidlercom80, 10-28-2023, 08:49 AM
    170 responses
    2,271 views
    0 likes
    Last Post sidlercom80  
    Started by Irukandji, Yesterday, 02:53 AM
    2 responses
    17 views
    0 likes
    Last Post Irukandji  
    Started by adeelshahzad, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post adeelshahzad  
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    3 views
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Working...
    X