NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 03-11-2012, 08:08 AM   #1
marcusjhdon
Junior Member
 
Join Date: Mar 2012
Posts: 6
Thanks: 0
Thanked 0 times in 0 posts
Question Scripts that aren't indicators or strategies

Hi

I've recently imported around 20 years of historical intraday Forex data for 34 currency pairs, but I can't figure out a sensible way to run a statistical analysis of this data using NinjaTrader.

For each currency pair, I need to loop through every bar, calculate some statistics and write the results to a text file for analysis in another application. This then needs to be repeated for 8 different time frames.

I've already written some custom indicators for doing the calculations, but it's not obvious to me how I can use these in another script that is neither an indicator nor a strategy. From the NT documentation, it seems that I might be able to do what I need with a strategy, but only if I manually run it 34 x 8 times. Also, I can't figure out how to "page" through the historical data without loading it all at once, which I probably don't have enough Ram to handle. So, I would probably end up having to run the script several thousand times, then repeat this whenever I make a change!

The obvious solution would be to use a script that does something like this:

Code:
- loop through instruments
  - loop though time frames
    - loop through data with x bars loaded in memory at any one time
      - do calculations
      - save data to text file
I've already done this using Sharescope, but was limited by the fact that it doesn't allow you to import intraday history (and I'd rather not wait 20 years to accumulate enough data!), so I decided to switch to NT instead. So far, I've been very impressed and found it much more well suited to experienced software developers, but I'm beginning to worry that it lacks this simple feature. Please can someone tell me otherwise?

Thanks

Marcus
marcusjhdon is offline  
Reply With Quote
 

Tags
command line, script, statistical analysis

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
No indicators or strategies mccallum28 ATM Strategies (Discretionary Trading) 3 12-19-2011 04:16 PM
Converting Strategies to Indicators jtfancher Indicator Development 3 07-26-2011 08:41 AM
Removing Indicators and Strategies kenb2004 Strategy Development 1 09-30-2010 08:11 AM
Adding Indicators to Strategies NinjaTrader_Josh Tips 0 09-06-2007 01:34 PM
NinjaScript Strategies vs Indicators whitmark General Programming 7 08-29-2007 02:55 PM


All times are GMT -6. The time now is 07:12 PM.