Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

convert.ToInt32 ? Is this necessary?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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. Thanks
    Last edited by ronaldgreene828; 01-02-2020, 03:01 PM.

    #2
    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

    Comment


      #3
      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.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      55 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      132 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      73 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      45 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X