Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
convert.ToInt32 ? Is this necessary?
Collapse
X
-
convert.ToInt32 ? Is this necessary?
Using the strategy builder, I created a strategy for entries and exits on a chart that is similar to renko bars. I unlocked the code on a copy of the strategy and I want to edit the entries and exits according to information in the Ninjatrader 8 tutorials. In the script there is "convert.ToInt32" as part of the entry line. Is this necessary? I can't find it in the Ninjatrader tutorials. I'm using Ninjatrader 8 / 64 bit version. ThanksLast edited by ronaldgreene828; 01-02-2020, 03:01 PM.Tags: None
-
Hello ronaldgreene828,
Thanks for your post.
Great question! No it is not needed IF the variable is an Integer type or a whole number. The strategy builder by default provides this conversion to prevent any errors if the value provided was a floating point type.
The Convert.ToInt32() is a C#.Net method to convert the input to a 32 bit integer value. Here is a link to further information: https://docs.microsoft.com/en-us/dot...tframework-4.8
-
Thanks, it was for default quantity for entries, an integer
I was trying to fix something by editing the script. Now I figured out what I was doing wrong in the strategy builder. I was focused on using the signal name to label entries and exits on the chart and I wasn't using the same signal name to link entries and exits.Last edited by ronaldgreene828; 01-02-2020, 06:06 PM.
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
79 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
40 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
54 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment