![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| Strategy Development Support for the development of custom automated trading strategies using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
Is it possible, once you have devellopped a strategy as a kind of framework, to coppy the whole strategy and rename it. The objective is to use this copy as a start for a new strategy?
|
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Please try NinjaScript Editor->Right click->Save As
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
I see. Unfortunately this is not supported.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
|
|
|
|
|
|
#6 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
I've used Save-As in this manner many times, and I can attest that it works well (but only when editing NinjaScript code - either Indicators or Strategies.)
When Save-As is run, in addition to creating a new file with a new name, it also changes name of the indicator throughout the file, which prevents errors that would result from having a redundant indicator/strategy name. However, it's possible that the [Description("whatever")] line doesn't have the indicator name in it, so it won't get changed. Since it's this description that gets displayed in the Indicators selection screen when adding indicators to a chart, it's wise to make sure that this name gets changed as well, as otherwise you will have an ambiguous situation where two different indicators display the same description in the Indicator selection screen. KBJ
Last edited by KBJ; 10-22-2007 at 01:45 PM.
|
|
|
|
|
|
#7 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Thanks for your suggestion. We'll add it to the list.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#8 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
What you can do in the Wizard is save a condition set as a "Template". Right click in the wizard where your conditions are to see how this is done.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#9 | |
|
Junior Member
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
|
|
|
|
|
|
|
#10 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
I know what you mean, Rob.
Has anyone suggested a feature whereby only portions of Wizard-generated code would be unlocked and could contain raw NinjaScript, while the rest could still be manipulated by the Wizard? There are probably some complicated design issues that prevent that, but does the wizard allow specification of user specified subroutines? If user written methods could be used, this might accomplish much the same thing, by allowing the Wizard to handle the mundane, and localizing the complexities in another module (or perhaps a section of code in the same module that is marked in some way as "user modifiable".) KBJ |
|
|
|
|
|
#11 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Unfortunately not. The wizard is limited although more advanced than others I have seen. For sure we can and will enhance it over time but right now there are things that just can't be accomodated for in the Wizard and one must move to the Editor if faced with a road block.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#12 | |
|
Junior Member
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
So here is the request for: a feature whereby only portions of Wizard-generated code would be unlocked and could contain raw NinjaScript, while the rest could still be manipulated by the Wizard! This would create great possibillities to make some local changes in the code without being a C# programmer. For example it would give me a way to expand the amount of User Defined Inputs by copy and change those statements created by the wizard. Or to create If, Then, Else staments. Etc, etc. |
|
|
|
|
|
|
#13 |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
Rob,
I think what Ray is saying, was also covered in my earlier post. Specifically, "There are probably some complicated design issues that prevent that". KBJ |
|
|
|
|
|
#14 | |
|
Senior Member
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
|
Quote:
Where, below, I referred to the [Description("whatever")] line, saying it "gets displayed in the Indicators selection screen when adding indicators to a chart", that is incorrect. I meant to say that you should make sure the [Gui.Design.DisplayName("whatever")] line is unique, as this is what gets displayed in the list of Indicators. Sorry for any confusion I may have caused. KBJ |
|
|
|
|
|
|
#15 |
|
Member
Join Date: Mar 2007
Location: Minnesota,USA
Posts: 95
Thanks: 0
Thanked 0 times in 0 posts
|
I know this is a stale thread but just in case someone is seeking a simple work around for this here is what I do.
When I develop a strategy in the Wizard I save it with a name like... StrategyWiz Once I take it as far as I want to in the Wizard I make sure I have a saved build of my latest Wiz code then I again open it in the Wizard and simply change the name on the second window to... StrategyCode Or I drop the Code word completely and just use the name I intend for the final version. I then click through the windows changing nothing else. I then open the Wizard one more time on my StrategyCode strategy and unlock the code. Gains |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how do you save your ninja layout? | chan123 | Miscellaneous Support | 4 | 08-27-2007 09:19 PM |
| Changing color of indicator and save it | ceesvh | Charting | 1 | 08-02-2007 02:47 PM |
| Is there a way to save indicators permanently? | ivanv | Charting | 2 | 07-18-2007 10:01 AM |
| save my working environment | rabruno | Suggestions And Feedback | 7 | 03-22-2007 10:36 AM |
| Unable to save a Stop Strategy | Savage1701 | Miscellaneous Support | 2 | 04-07-2006 04:44 AM |