Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Save as function possible for Strategies?
Collapse
X
-
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?Tags: None
-
-
-
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.
KBJLast edited by KBJ; 10-22-2007, 01:45 PM.
Comment
-
Originally posted by KBJ View PostI'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
Comment
-
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
Comment
-
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.RayNinjaTrader Customer Service
Comment
-
On the same track
Originally posted by KBJ View PostI 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
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.
Comment
-
Originally posted by KBJ View PostI'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
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
Comment
-
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
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Mestor, Today, 03:15 AM
|
1 response
7 views
0 likes
|
Last Post Today, 07:41 AM | ||
Started by RaygunWizzle, Yesterday, 08:52 PM
|
1 response
8 views
0 likes
|
Last Post Today, 07:40 AM | ||
Started by Mestor, 03-10-2023, 01:50 AM
|
13 responses
314 views
0 likes
|
Last Post Today, 07:29 AM | ||
Started by Lele2k24, Yesterday, 11:24 AM
|
7 responses
25 views
0 likes
|
Last Post Today, 07:25 AM | ||
Started by martini, Yesterday, 04:45 PM
|
2 responses
15 views
0 likes
|
Last Post
by martini
Today, 07:23 AM
|
Comment