Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Subtracting from a double

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

    Subtracting from a double

    I want to subtract 2 pips from a low. How do I do that?

    I have
    Code:
    MIN(Low, 3)[0] - 2 * TickSize
    but am getting the error
    Operator '-' cannot be applied to operands of type 'string' and 'double'

    #2
    Originally posted by lifzgreat View Post
    I want to subtract 2 pips from a low. How do I do that?

    I have
    Code:
    MIN(Low, 3)[0] - 2 * TickSize
    but am getting the error
    That looks correct. Are you sure that your error is coming from that line in that indicator? Maybe you could post a snapshot of your error screen ?
    Last edited by koganam; 06-21-2013, 10:12 AM. Reason: Corrected spelling.

    Comment


      #3
      I feel silly. I had that code in the middle of a string w/o enclosing it in parens. I changed that and now I have no error. Sorry!

      Code:
      Print("SL should be " + (MIN(Low, 3)[0] - 2 * TickSize));

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      647 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      369 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      108 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      572 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      573 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X