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 Wanted: I am new to NinjaTrader, not a programmer

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

    NinjaScript Help Wanted: I am new to NinjaTrader, not a programmer

    I have written a little ThinkScript & EasyLanguage, but not C# or similar. Please help me with my first indicator, something simple ...

    Primarily, an average of a calculation for the past number of specified bars.
    A lower-plot to display a single line.

    ThinkScript: average(((high-low) / ((open+close) / 2)),barLength)*100;
    Code:
            protected override void OnBarUpdate()
            {						 			
    			double calc = ( ( (High[0]-Low[0])/(Open[0]+Close[0]) ) /2 )*100;
    			
    			Line1.Set(calc);
            }
    See attached an initial preliminary file.

    How is the input user-specified number of bars handled? Average?

    If you can write all for me -- Great! And/or, I appreciate any help and/or direction that you can provide.

    I have been reading many NinjaTrader items. Please suggest any related references?

    Thanks!
    -- Tren D
    Attached Files

    #2
    Hello,

    Thank you for your post and welcome to our forums!

    The user-specified number of bars is handled from the number of "Days to Load" on your chart.

    We would not be able to program your strategy for you, but we do have a number of NinjaScript consultants you may contact:



    If you would like to take on learning NinjaScript on your own, we have a fully documented help guide which will help you get started with Ninja Script. You will find language references to all of the methods and functions you will be using. You will also see a tutorial section which will help you create your first indicator and get you started with some of these concepts.

    A link to our Help Guide can be found below: http://www.ninjatrader.com/support/h...stribution.htm

    You will fine Reference Samples online as well as some Tips and Tricks for both indicators and strategies:
    Click here to see our NinjaScript Reference Samples


    Click here to see our NinjaScript Tips
    MatthewNinjaTrader Product Management

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by alifarahani, Today, 09:40 AM
    2 responses
    11 views
    0 likes
    Last Post alifarahani  
    Started by junkone, Today, 11:37 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by pickmyonlineclass, Today, 12:23 PM
    0 responses
    1 view
    0 likes
    Last Post pickmyonlineclass  
    Started by frankthearm, Yesterday, 09:08 AM
    12 responses
    44 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by quantismo, 04-17-2024, 05:13 PM
    5 responses
    35 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X