NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > NinjaScript Development Support > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 10-22-2007, 01:19 PM   #1
Trader Rob
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Question Save as function possible for Strategies?

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?
Trader Rob is offline  
Reply With Quote
Old 10-22-2007, 01:22 PM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Please try NinjaScript Editor->Right click->Save As
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-22-2007, 01:35 PM   #3
Trader Rob
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by NinjaTrader_Dierk View Post
Please try NinjaScript Editor->Right click->Save As
Oh, I have forgotten to say that up till now I can only work with the strategy wizzard that has not such a function. So is there a possibillity to do this with Windows explorer?
Trader Rob is offline  
Reply With Quote
Old 10-22-2007, 01:37 PM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

I see. Unfortunately this is not supported.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-22-2007, 01:42 PM   #5
Trader Rob
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Default Something to build in a new release?

Quote:
Originally Posted by NinjaTrader_Dierk View Post
I see. Unfortunately this is not supported.
May be this is something to build in a new release?
I will send some sugestions for the Strategy Wizard.
Trader Rob is offline  
Reply With Quote
Old 10-22-2007, 01:42 PM   #6
KBJ
Senior Member
 
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
Default

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.
KBJ is offline  
Reply With Quote
Old 10-22-2007, 01:44 PM   #7
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Quote:
Originally Posted by Trader Rob View Post
May be this is something to build in a new release?
I will send some sugestions for the Strategy Wizard.
Thanks for your suggestion. We'll add it to the list.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 10-22-2007, 01:56 PM   #8
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

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.
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-22-2007, 02:13 PM   #9
Trader Rob
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Default

Quote:
Originally Posted by KBJ View Post
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
I don't mind using the script editor for using of the Save As function. But once you unlock the code that is made with the Strategy Wizzard you can't use the wizard anymore to change/expand my strategy. And I want to stay within the abilities of the wizard.
Trader Rob is offline  
Reply With Quote
Old 10-22-2007, 02:39 PM   #10
KBJ
Senior Member
 
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
Default

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
KBJ is offline  
Reply With Quote
Old 10-22-2007, 03:01 PM   #11
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

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.
NinjaTrader_Ray is offline  
Reply With Quote
Old 10-22-2007, 03:05 PM   #12
Trader Rob
Junior Member
 
Join Date: Oct 2007
Posts: 12
Thanks: 0
Thanked 0 times in 0 posts
Question On the same track

Quote:
Originally Posted by KBJ View Post
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
KBJ, we are on the same track of mind at this subject.

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.
Trader Rob is offline  
Reply With Quote
Old 10-22-2007, 03:23 PM   #13
KBJ
Senior Member
 
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
Default

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
KBJ is offline  
Reply With Quote
Old 10-22-2007, 08:34 PM   #14
KBJ
Senior Member
 
Join Date: Mar 2007
Location: , Florida, USA
Posts: 663
Thanks: 36
Thanked 7 times in 6 posts
Default

Quote:
Originally Posted by KBJ View Post
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
Correction:

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
KBJ is offline  
Reply With Quote
Old 03-15-2008, 05:31 AM   #15
Gains
Member
 
Join Date: Mar 2007
Location: Minnesota,USA
Posts: 95
Thanks: 0
Thanked 0 times in 0 posts
Default

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
Gains is offline  
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
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


All times are GMT -6. The time now is 12:18 AM.