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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
72 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
39 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
63 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
63 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment