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 argusthome, 03-08-2026, 10:06 AM
|
0 responses
111 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
59 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
38 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
42 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
78 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment