NinjaTrader Support Forum  

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

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-15-2012, 07:17 PM   #1
Atomic
Member
 
Join Date: Jan 2010
Posts: 90
Thanks: 4
Thanked 5 times in 4 posts
Default Importing cs files

I'm helping someone convert strategies written in NinjaScript to EasyLanguage. I have the cs files, which were evidently exported from NT, but I do not see a way to get them back into my NT platform.

Thanks.

Tom
Atomic is offline  
Reply With Quote
Old 05-15-2012, 08:00 PM   #2
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 3,824
Thanks: 324
Thanked 563 times in 543 posts
Default

Hello Tom,

Thank you for your note.

You will have to manually import the .CS files into NinjaTrader.

To do this copy the .CS files and then paste them into the following directory: My Documents\NinjaTrader 7\bin\Custom\Strategy
If they are Indicators it will need to be the following directory: My Documents\NinjaTrader 7\bin\Custom\Indicator

Once complete, go to Tools > Edit NinjaScript > Indicator > select any indicator > OK > once the NinjaScript Editor window opens press F5 on your keyboard to compile your NinjaScript files.

Please let me know if you receive any errors after compiling the NinjaScript files.
NinjaTrader_PatrickH is offline  
Reply With Quote
Old 05-16-2012, 02:40 AM   #3
Atomic
Member
 
Join Date: Jan 2010
Posts: 90
Thanks: 4
Thanked 5 times in 4 posts
Default

Worked great. Thanks.
Atomic is offline  
Reply With Quote
Old 05-26-2013, 01:30 PM   #4
GILAZ
Junior Member
 
Join Date: Sep 2012
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
Smile .cs file use ??

goodnight,
I try to import a file of .cs with your instructions and I see after F5, 2 errors appears
What should I do?
GILAZ is offline  
Reply With Quote
Old 05-26-2013, 01:48 PM   #5
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO, USA
Posts: 3,824
Thanks: 324
Thanked 563 times in 543 posts
Default

Hello GILAZ,

Thank you for your post.

Please follow the instructions below to see where the errors are coming from after compiling the indicator. This will allow you to debug the indicator/strategy or remove it from your PC. If you are wondering why you receive an error when compiling only one indicator, it is because NinjaTrader always compiles all indicators and strategies - not just one. This is done to give you the highest runtime performance possible.
  • Open NinjaTrader
  • From the Control Center select the Tools menu--> select the Edit NinjaScript menu item--> select Indicator
  • Select any indicator and double click on it (we need only to open and compile one script to see all compile errors for all files).
  • A new window will appear and you will need to right click in the window and select Compile to compile the indicators.
  • At the bottom of the window a new section will appear where you can find the error locations.
  • From there you have the option to comment out offending code sections, remove the complete indicator or debug it to be able to compile again.
If you are unsure as to what the error is indicating, please send me a screenshot of the error with the name and description fields clearly readable.

To send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CRTL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

We have also collected more comprehensive steps for resolving NinjaScript programming errors in this tip on our forums - http://www.ninjatrader.com/support/f...ead.php?t=4678
NinjaTrader_PatrickH is offline  
Reply With Quote
Old 06-22-2013, 05:28 AM   #6
GILAZ
Junior Member
 
Join Date: Sep 2012
Posts: 4
Thanks: 0
Thanked 0 times in 0 posts
Default

Error Message :" protected override void GomOnTermination() "
What I can do now ?
GILAZ is offline  
Reply With Quote
Old 06-24-2013, 08:14 AM   #7
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 24,543
Thanks: 386
Thanked 1,395 times in 1,364 posts
Default

GILAZ, would you mind emailing us with the files you tried importing at support at ninjatrader dot com so we could check into further?
NinjaTrader_Bertrand is online now  
Reply With Quote
Reply

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
Importing .cs files JerryA Miscellaneous Support 2 04-11-2012 07:16 AM
importing tick data files JoulVern Connecting 1 12-21-2011 02:49 AM
CS, XML ANd NTD files tpt56 Miscellaneous Support 1 12-12-2011 09:20 PM
Importing txt files Birle Miscellaneous Support 8 12-30-2010 06:03 AM
Importing .csv files buderim Miscellaneous Support 1 07-10-2007 10:19 PM


All times are GMT -6. The time now is 03:43 AM.