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 NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
69 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment