The script will run as a NinjaScript Strategy. The strategy will be applied to a chart.
First, it will read in a file in the following format:
"Open Time ET","Action","Num Opened","Symbol","Descrip","Open Price","Num Closed","Closed Time ET","Close Price","Adverse DD Risk","DD as %","DD $","DD Time ET","DD Quant","DD Worst Price","Trade P/L"
"10/10/12 10:31","BUY","1","@WZ2","WHEAT","870.4528","1","10/10/12 10:41","874.6604","Low","-0.13","-22.65","10/10/12 10:36","1","870.0000","196.00"
"10/4/12 10:31","SELL","1","@WZ2","WHEAT","879.0000","1","10/4/12 11:21","872.7250","Low","-0.58","-100.00","10/4/12 10:33","-1","881.0000","300.00"
"10/2/12 10:37","SELL","1","@WZ2","WHEAT","870.7500","1","10/2/12 11:08","868.2391","Low","-0.66","-112.50","10/2/12 10:51","-1","873.0000","112.00"
"10/1/12 10:35","SELL","1","@WZ2","WHEAT","890.3068","1","10/1/12 10:42","885.6250","","n/a","","","","","220.00"
"9/28/12 10:31","BUY","1","@WZ2","WHEAT","879.0555","1","9/28/12 10:36","886.6945","Low","-0.32","-52.80","9/28/12 10:34","1","878.0000","368.00"
"9/27/12 10:42","SELL","1","@WZ2","WHEAT","867.0125","1","9/27/12 11:27","861.6625","Low","-0.46","-74.35","9/27/12 10:52","-1","868.5000","254.00"
"9/25/12 10:40","SELL","1","@WZ2","WHEAT","888.5625","1","9/25/12 11:59","885.7500","Low","-0.06","-9.40","9/25/12 11:13","-1","888.7500","127.00"
The first line is ignored. Each of the following lines represents a trade that was taken. These trades will then be imported as trade objects into ninja trader. They will be applied to the underlying instrument to the chart that has been opened (e.g. the symbol/description is irrelevant). The relevant columns are as follows:
"Open Time ET" The time the trade was taken
"Action" e.g. Buy or Sell
"Num Opened" The trade quantity
Open Price" The price at which the trade was taken
"Closed Time ET" The time the trade was closed
"Close Price” The price at which the trade was closed
You can see this script in this thread to get you started:
[login to view URL]
However, note that the input format is different to the above script. Moreover, there are some issues with the above script that need fixing.