Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can you bool a drawing?

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

    Can you bool a drawing?

    Hello,

    I am trying to add the option to display arrows when triggered. Keyword "option" (I.e. Bool). When compiling the code I get the error "CS0029 Cannot implicitly convert type 'NinjaTrader.NinjaScript.DrawingTools.ArrowUp' to 'bool'. I thought I had everything correct, but I guess I am missing something small or it cannot be done. Can someone help clarify?

    #2
    Hello bigc0220,
    Thanks for your post.

    No you would not be able to do that and why would you want to? You can create a condition with a public bool that would allow you to switch the arrows on/off.

    if(myBool==true)
    Draw.ArrowUp(this, "tag1", true, 0, Low[0] - TickSize, Brushes.Red);

    I suggest using the NinjaScript Builder to create the input and then copy/paste the public property into your script.
    Josh G.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JoshG View Post
      Hello bigc0220,
      Thanks for your post.

      No you would not be able to do that and why would you want to? You can create a condition with a public bool that would allow you to switch the arrows on/off.

      if(myBool==true)
      Draw.ArrowUp(this, "tag1", true, 0, Low[0] - TickSize, Brushes.Red);

      I suggest using the NinjaScript Builder to create the input and then copy/paste the public property into your script.
      That's what I meant, maybe I worded it wrong/weird. I will give this a try and see if it works. Thank you!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      52 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      71 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      38 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      99 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      60 views
      0 likes
      Last Post PaulMohn  
      Working...
      X