• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Gathering SMA datapoints

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

    Gathering SMA datapoints

    Hi I would like to know how I can go about gathering SMA data points for the close of each bar. I would like to match the SMA data points to closing prices (in excel)...

    I assume I would need to log data with a chart open, print the closing price and sma price to the output window and copy the info?

    Is there a way to get his data without real time loggin?

    Thank you

    #2
    Hello brucelevy,

    You can call the SMA indicator in a NinjaScript indicator or strategy.

    This will contain a price of the SMA for each bar on the chart.

    For example:
    if (CurrentBar > 5)
    {
    Print(SMA(14)[5]);
    }

    This would print the SMA value from 5 bars ago.

    Below if a public link to the help guide.
    https://ninjatrader.com/support/help...simple_sma.htm

    You will need a source of data if you want this on a chart, printed to the output window, or writing data to a file.

    Below is a link to post about connecting for data.
    https://ninjatrader.com/support/foru...951#post503951

    As well as a link about getting started with NinjaScript.
    https://ninjatrader.com/support/foru...609#post503609
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Gav_G, Today, 02:12 PM
    2 responses
    4 views
    0 likes
    Last Post Gav_G
    by Gav_G
     
    Started by Gav_G, Today, 01:41 PM
    0 responses
    5 views
    0 likes
    Last Post Gav_G
    by Gav_G
     
    Started by kweiss, Today, 01:21 PM
    0 responses
    5 views
    0 likes
    Last Post kweiss
    by kweiss
     
    Started by digibob, Yesterday, 06:45 AM
    2 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Started by cutzpr, Today, 08:44 AM
    0 responses
    3 views
    0 likes
    Last Post cutzpr
    by cutzpr
     
    Working...
    X