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 Hwop38, 05-04-2026, 07:02 PM
|
0 responses
160 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
307 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
244 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
348 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
178 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|

Comment