NexusFi: Find Your Edge


Home Menu

 





Importing a .cs - file indicator / strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sleepy with 6 posts (2 thanks)
    2. looks_two Big Mike with 4 posts (2 thanks)
    3. looks_3 max-td with 4 posts (32 thanks)
    4. looks_4 Mohammed Akram with 4 posts (1 thanks)
      Best Posters
    1. looks_one RJay with 19 thanks per post
    2. looks_two Saroj with 11 thanks per post
    3. looks_3 max-td with 8 thanks per post
    4. looks_4 Silvester17 with 3 thanks per post
    1. trending_up 45,417 views
    2. thumb_up 76 thanks given
    3. group 26 followers
    1. forum 39 posts
    2. attach_file 4 attachments




 
Search this Thread

Importing a .cs - file indicator / strategy

  #1 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

Hi,
here an answer to a FAQ :

How to import a .cs- file into NT (indicator or strategy)

- open the .cs-file in windows editor -- you should see lot of text here.

- do in Ninja > Tools > Edit NinjaSript > Indicator --- and open one indicator - no matter wich one + delete ALL the text there

- now copy the whole text from the .cs-file into the indicator-file

- now - IMPORTANT - copy the indicators name from the file - you find it mostly between line 20 to 30 :

in example public class MaxDots007 : Indicator

 
Code
                            
    /// <summary>
    /// 
    /// </summary>
    
[Description("")]
    public class 
MaxDots007 Indicator 
- then rightklick + "save as" .... insert this name here + klick OK

- now compile the indicator ( F5 or compile-button)

-- DONE

that should work.
Have Fun!



max-td
Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
Request for MACD with option to use different MAs for fa …
NinjaTrader
ZombieSqueeze
Platforms and Indicators
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
62 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
35 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #2 (permalink)
 
RJay's Avatar
 RJay 
Hartford, CT. USA
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AMP/CQG, Kinetick
Trading: RTY
Posts: 682 since Jun 2009
Thanks Given: 756
Thanks Received: 787

Hi max-td,

Personally, I just copy the cs file to the appropriate folder.

Then I re-import the zip file of some indicator I don't care about.

This triggers an intellisense reload of all cs files.

The copied cs file is now selectable from the charts menu.

Done!!!

RJay

Reply With Quote
The following 19 users say Thank You to RJay for this post:
  #3 (permalink)
 
Saroj's Avatar
 Saroj 
Arcata, CA
 
Experience: Intermediate
Platform: NinjaTrader
Trading: index futures, oil
Posts: 485 since Jun 2009
Thanks Given: 232
Thanks Received: 415


  • copy or save it to My Documents\NinjaTrader 6.5\bin\Custom\Indicator (or ...\Strategy if a strategy cs file).
  • from the Control Center, Tools-Edit NinjaScript-Indicator (or ...-Strategy if that)
  • double click on any file name in the list that is displayed
  • when it opens to show the code, press F5 to compile it.
This works because when any cs file is compiled in NinjaTrader, it compiles any and all other cs files that have been changed since the last time it did so.

Reply With Quote
The following 11 users say Thank You to Saroj for this post:
  #4 (permalink)
 bingo17 
toronto canada
 
Experience: Intermediate
Platform: Ninja
Trading: CL
Posts: 54 since Jan 2010


RJay View Post
Hi max-td,

Personally, I just copy the cs file to the appropriate folder.

Then I re-import the zip file of some indicator I don't care about.

This triggers an intellisense reload of all cs files.

The copied cs file is now selectable from the charts menu.

Done!!!

RJay


RJay you are a genius...I tried to do it a couple of other ways but could never get it to work...yours did the trick...a million thanks!!!!

Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 ideaman 
Pennslyvania
 
Experience: Intermediate
Platform: ninjatrader
Trading: ES
Posts: 42 since Sep 2010
Thanks Given: 4
Thanks Received: 40

Thanks all. I'm going to experiment with all the suggestions.

Reply With Quote
  #6 (permalink)
 bermarti 
Eau Claire, WI USA
 
Experience: Intermediate
Platform: ninja trader
Broker: Amp Futures/ zen Fire
Trading: ES, 6E, ZN
Posts: 12 since Jun 2009
Thanks Given: 53
Thanks Received: 3

Cory,
The error message is an Import NinjaScript Archive File (.zip) Warning which reads "You have custom NinjaScript files on you PC that have programming errors. These errors must be resolved before you can import a NinjaScript Archive File."

After I remove VolumeStopV5 indicator I am able to import other indicators. I have no problem importing indicators in zip format but importing the cs format gives me problems.

I appreciate your willingness to share thank you for your help.

Reply With Quote
  #7 (permalink)
 
sleepy's Avatar
 sleepy 
London, UK
 
Experience: None
Platform: NinjaTrader
Trading: ES, CL
Frequency: Several times daily
Duration: Hours
Posts: 121 since Sep 2010
Thanks Given: 2,289
Thanks Received: 114

Im trying to install a .cs file in NinjatTrader 7 but getting nowhere.


jtEconNews2.cs

Have tried the above suggestions.... but obviously still doing someting wrong/stupid. Any ideas?

sleepy

Reply With Quote
  #8 (permalink)
 
max-td's Avatar
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
Posts: 1,752 since Jun 2009
Thanks Given: 2,309
Thanks Received: 927

hi sleepy,
please describe what you do step by step + whats happening then. ( errors ? )
maybe we find the issue.

max-td
Started this thread Reply With Quote
The following user says Thank You to max-td for this post:
  #9 (permalink)
 
sleepy's Avatar
 sleepy 
London, UK
 
Experience: None
Platform: NinjaTrader
Trading: ES, CL
Frequency: Several times daily
Duration: Hours
Posts: 121 since Sep 2010
Thanks Given: 2,289
Thanks Received: 114

Hi max-td,

When I go ....
Edit NinjaScript > Indicator > Edit Indicator
The file jtEconNews2 already exists
I doubleclick and it opens ... I then run compile and resave as jtEconNews2

However when I go onto Chart and select indicators (CTrl I) it doesnt appear in my list of indicators

At no stage do I get any errors.

sleepy

Reply With Quote
  #10 (permalink)
 Xeno 
UK
 
Experience: Intermediate
Platform: Ninja
Broker: Mirus/Zen
Trading: Futures - bonds, currencies, index
Posts: 288 since Oct 2010
Thanks Given: 70
Thanks Received: 274



sleepy View Post
Hi max-td,

When I go ....
Edit NinjaScript > Indicator > Edit Indicator
The file jtEconNews2 already exists
I doubleclick and it opens ... I then run compile and resave as jtEconNews2

However when I go onto Chart and select indicators (CTrl I) it doesnt appear in my list of indicators

At no stage do I get any errors.

sleepy

Maybe the file has a different declared indicator name in it - that is ultimately what appears in the indicators list.

Do this - select and copy all the text in the cs file you want to import. Open indicator jtEconNews2. Delete all text in it. Paste the text you copied earlier. Press F5. Check the list.

Reply With Quote





Last Updated on November 30, 2016


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts