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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
578 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment