Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

'Unhandled Exception' message won't go

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

    'Unhandled Exception' message won't go

    Hi,

    I'm just having a go at building my first strategy in NT8. Going through the builder I was trying to create a rule that would end a trade after an exact number of ticks (to simulate a binary option). I created a variable called 'timeinmarket' and tried to create a rule that would increment it. While suspecting that the builder might not allow an expression in that field rather than just a value, I nevertheless tried to create an action - 'Set timeinmarket' = 'timeinmarket + 1'..

    As soon as I pressed 'Enter' it immediately showed an 'Unhandled Exception: Input string was not in the correct format' message box, as per the attached screenprint, But no matter where I click on it, that message will not go and I am unable to continue. It looks as though the only option I have is to shutdown Ninjatrader without being able to save the work I've already done this session, which would be annoying.

    I have the most up-to-date version of NT8, downloaded yesterday.

    So the other part of the problem then, how do I get an order placed to automatically exit the market after a certain number of ticks / minutes or whatever?

    Thanks,

    Mike
    Attached Files

    #2
    Hello Mike,

    What is the variable type of the variable you have created?

    As a heads up, the Strategy Builder is not capable of math such as incrementing or decrementing or adding two variables together.

    Any math required would require unlocking the script and coding manually.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      It's an integer. You've confirmed what I suspected may be true - that I need to code manually rather than through the builder. It looks as though I'll have to build a simpler system first to then unlock in order to get the hang of the code more easily.

      Thanks,

      Mike

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by mmckinnm, Today, 01:34 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by Conceptzx, 10-11-2022, 06:38 AM
      3 responses
      60 views
      0 likes
      Last Post NinjaTrader_SeanH  
      Started by f.saeidi, Today, 01:32 PM
      1 response
      2 views
      0 likes
      Last Post NinjaTrader_Erick  
      Started by traderqz, Today, 12:06 AM
      9 responses
      16 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Started by kevinenergy, 02-17-2023, 12:42 PM
      117 responses
      2,766 views
      1 like
      Last Post jculp
      by jculp
       
      Working...
      X