Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Need some help
Collapse
X
-
Sorry, those were not correct lines. After double clicking on error message word Performance gets highlighted in both of those lines (below):
&& Performance.AllTrades.Performance.Points.CumProfit < Variable0)
and this
&& Performance.AllTrades.Performance.Points.CumProfit < Variable0)
Comment
-
Thanks Dierk, it works now, however I have two user defined variables in my strategy that need to be optimized. When I right click on product and click backtest I can't see those in the window with wizard settings. Do I have to declare them first somehow ? Thanks
Comment
-
Dierk, I checked all this stuff but still can't make it work. I'm trying to reset (at 3:14pm) a variable (pL) that calculates realized P/L so I added condition:
// Condition set 3
if (ToTime(Time[0]) >= 151400
set { pL = 0 }
which I guess is correct, however an error comes up few lines below:
#region Properties
[Description("")]
{[Category("Parameters")] - message says }expected
publicint TG
How do I correct it ?
Comment
-
Not sure what wanted to do but your code snippet below is not C#. I suggest reading a book on C# to understand the basic syntax concept (e.g. check on Amazon or free web ressources).
Unfortunately we can't provide support down to the level of C# coding basics. However here is a hint; your code below probably should read like
Code:[FONT=Courier New][SIZE=2][COLOR=#0000ff]if[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2] (ToTime(Time[[/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]]) >= [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]151400) [/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2]pL = [/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#800080]0[/COLOR][/SIZE][/FONT][SIZE=2][FONT=Courier New];[/FONT][/SIZE]
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
105 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
94 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
72 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
91 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Comment