|03-11-2012, 08:08 AM||#1|
Join Date: Mar 2012
Thanked 0 times in 0 posts
Scripts that aren't indicators or strategies
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:
- 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
|command line, script, statistical analysis|
|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|