Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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.8Paul H.NinjaTrader Customer Service
-
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 cmtjoancolmenero, Yesterday, 03:58 PM
|
1 response
17 views
0 likes
|
Last Post Today, 06:16 AM | ||
Started by benmarkal, Yesterday, 12:52 PM
|
3 responses
23 views
0 likes
|
Last Post Today, 05:22 AM | ||
Started by helpwanted, Today, 03:06 AM
|
1 response
19 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
244 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
Comment