• 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 ballboy11, Today, 02:01 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Started by cutzpr, Today, 02:01 PM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by mcjosejavier, Today, 10:04 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by odeifuor, Today, 09:05 AM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_Kate  
    Started by jhontorres, Today, 12:16 PM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X