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 normanreeduscbdoil, Today, 10:08 PM
    0 responses
    5 views
    0 likes
    Last Post normanreeduscbdoil  
    Started by herbalgrown1, Today, 10:01 PM
    0 responses
    2 views
    0 likes
    Last Post herbalgrown1  
    Started by marthaviliyam, Today, 09:58 PM
    0 responses
    4 views
    0 likes
    Last Post marthaviliyam  
    Started by herbalgrown1, Today, 09:57 PM
    0 responses
    3 views
    0 likes
    Last Post herbalgrown1  
    Started by StephenSearle, Today, 09:03 PM
    0 responses
    5 views
    0 likes
    Last Post StephenSearle  
    Working...
    X