Announcement

Collapse
No announcement yet.

Printing prices

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

  • Printing prices

    I have written an EFS which uses formatPriceNumber and drawText to put target and stop prices above and below the current bar.

    Some prices e.g. Forex can be six or seven characters long and therefore too large to be practical.

    Is it possible to extract the two least significant digits from the result of formatPriceNumber so that I can drawText that instead?

    e.g 1.2345 would become 45
    or 1234.5 would become 4.5

    Thanks in advance.

  • #2
    Re: Printing prices

    BerkoBob
    formatPriceNumber() returns a string so you can use the various methods of the String Object to retrieve whatever characters you want. You can find detailed examples of the usage in this article in the KnowledgeBase
    FYI I found these articles by searching the KB for the word string
    Alex


    Originally posted by BerkoBob
    I have written an EFS which uses formatPriceNumber and drawText to put target and stop prices above and below the current bar.

    Some prices e.g. Forex can be six or seven characters long and therefore too large to be practical.

    Is it possible to extract the two least significant digits from the result of formatPriceNumber so that I can drawText that instead?

    e.g 1.2345 would become 45
    or 1234.5 would become 4.5

    Thanks in advance.

    Comment

    Working...
    X