![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Sep 2011
Posts: 79
Thanks: 40
Thanked 2 times in 2 posts
|
hi - I have an indicator I am working on where one of it's inputs is a TimeSpan type (see code below). For some reason which I can't figure out, when I save the workspace, the values I set to this parameter are not saved. When I reopen the workspace, the value returns to the initial/default value (00:00:00).
Other indicator params retain value just fine. Any ideas? Code:
private TimeSpan noTradeStart1; Code:
[Description("")]
[GridCategory("Parameters")]
public TimeSpan NoTradeStartTime1
{
get { return noTradeStart1; }
set { noTradeStart1 = value; }
}
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Sep 2008
Posts: 543
Thanks: 80
Thanked 187 times in 131 posts
|
In the indicator window ('ctrl + i' in a chart), when you're configuring or adding the indicator, set the timespan you want to save, right-click on the right-hand side of the window and choose "Set default for 'x'."
|
|
|
|
|
|
#3 |
|
Member
Join Date: Sep 2011
Posts: 79
Thanks: 40
Thanked 2 times in 2 posts
|
thanks. That saves the defaults for the study and it does work. The problem with that is that it means that I have one set of settings for the study and can't store different settings which is what I expect to have with workspaces. Really need the ability to save these values per workspace.
|
|
|
|
|
|
#4 | |
|
Senior Member
|
Quote:
|
|
|
|
|
|
The following 3 users say thank you to koganam for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Strategy settings saved in workspace.xml? | cassb | Miscellaneous Support | 4 | 03-19-2012 07:38 AM |
| type of price (last/bid/ask) saved from realtime data | SARdynamite | Miscellaneous Support | 9 | 03-22-2011 09:05 AM |
| Workspace opening charts in saved time ascending order | laurus12 | Charting | 4 | 08-02-2010 06:19 PM |
| Default workspace never gets saved | maxpi | Miscellaneous Support | 3 | 05-03-2009 04:27 AM |
| Losing saved chart workspace | Drew | Charting | 1 | 05-16-2007 07:03 AM |