Announcement

Collapse
No announcement yet.

Math Problem Help

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Math Problem Help

    Shouldn't 14500 - 14510 produce -10?

    I'm not getting any negative numbers in my calculations. What could be wrong? I'm trying to calculate short position profit with

    profit = entry - close();

    When the trade goes down it works fine but when it goes up against the position it shows a positive number instead of a negative one!

    Hmm? thx

  • #2
    Hi Geoff,

    I also keep track and display in the cursor window a trades P&L using a similiar calcualtion and it seems to work fine.

    The only difference in my code is that I'm using an index value when I call the close function, " close(0) ", you may want to try doing that.

    I thought that without a index specification close() and other similiar functions in the latest release of eSignal returns a series.

    Let me know if it works, if not I'll send you the entire EFS. You may also want to post or email it if this doesn't resolve it.


    glen
    Glen Demarco
    [email protected]

    Comment


    • #3
      I put 'var' in front of my global variables and used your close(0) suggestion and now it is working.. weird. I never used to do these things.. I should be using proper syntax anyway. Thanks man

      Comment

      Working...
      X