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!
See more
See less

Partner 728x90

Collapse

Add/Subtract x quantity of pixels

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

    Add/Subtract x quantity of pixels

    From an example in this forum I got an example where it Renders a Rectangle:
    In order to render, the code has to obtain the center of the Rectangle or Ellipse. using the following piece of code
    .


    The Question:
    How shall the syntax be, in order to add/subtracts 4 pixels instead of 4 Ticksize??

    Thank you very much!!
    FVJ

    #2
    Hello efeuvejota01,

    When working with pixels those are just numbers so you can just subtract the amount you wanted. If you wanted to add or subtract 4 pixels you would just subtract or add 4 without doing any additional math. For example if the coordiate was 500 and you wanted to subtract pixels that would be 500 - 4.



    JesseNinjaTrader Customer Service

    Comment


      #3
      Ahhh !!! undestood...
      Thank you..
      FVJ

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by lorem, 04-25-2024, 09:18 AM
      10 responses
      45 views
      0 likes
      Last Post lorem
      by lorem
       
      Started by swjake, Today, 12:04 PM
      1 response
      3 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by kevinenergy, Today, 12:01 PM
      0 responses
      4 views
      0 likes
      Last Post kevinenergy  
      Started by ETFVoyageur, 05-07-2024, 07:05 PM
      8 responses
      61 views
      0 likes
      Last Post ETFVoyageur  
      Started by Taddypole, 04-26-2024, 02:47 PM
      8 responses
      73 views
      0 likes
      Last Post eDanny
      by eDanny
       
      Working...
      X