private double tsiOB = 50;
private double tsiOS = -50; // ---<<<
private int tsiFast = 3;
private int tsiSlow = 14;
[Description("")]
[GridCategory("Parameters")]
[Gui.Design.DisplayName ("za.TSI tsiOB")]
public double TsiOB
{
get { return tsiOB; }
set { tsiOB = Math.Max(0.01, value); }
}
[Description("")]
[GridCategory("Parameters")]
[Gui.Design.DisplayName ("zb.TSI tsiOS")]
public double TsiOS
{
get { return tsiOS; }
set { tsiOS = Math.Max(0.01, value); }
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Problem negative value
Collapse
X
-
Problem negative value
Hi, there is a problem with a negative value under "properties".
See the picture: The 0.01 must be -50 ! --<<< negative valueCode:Last edited by mate41; 02-03-2016, 11:41 AM.Tags: None
-
Hello mate41,
The value that you set at
is an initialization value. If you look lower, you see it has this getter and setter :Code:private double tsiOS = -50;
The value you are setting here is stomping your initialization value. If, for instance, you modify the code as follows :Code:public double TsiOS { get { return tsiOS; } set { tsiOS = Math.Max(0.01, value); } }
You will see the expected value.Code:public double TsiOS { get { return tsiOS; } set { // tsiOS = Math.Max(0.01, value); tsiOS = value; } }Jessica P.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
22 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
12 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
8 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
10 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
16 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment