• 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 mkoning, Today, 04:20 PM
    0 responses
    1 view
    0 likes
    Last Post mkoning
    by mkoning
     
    Started by itrader46, Today, 02:59 PM
    3 responses
    7 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by madams212121, Today, 12:10 PM
    13 responses
    28 views
    0 likes
    Last Post NinjaTrader_Jim  
    Started by jvanelli, Today, 12:19 PM
    1 response
    20 views
    0 likes
    Last Post NinjaTrader_BrendanC  
    Started by raaxus, Today, 11:17 AM
    3 responses
    21 views
    0 likes
    Last Post NinjaTrader_ChrisL  
    Working...
    X