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 CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
22 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
121 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
177 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
92 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
136 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|

Comment