Announcement

Collapse
No announcement yet.

formatPriceNumber

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

  • formatPriceNumber

    Is seems the function formatPriceNumber() always format the price according to the primary symbol of the chart. However if I need to send orders of other symbols which are different from the primary symbol, how can I format those prices correctly?
    This question is regarding to one of Jason's post in this thread:
    http://forum.esignalcentral.com/show...threadid=19433

    Could you disclose the details of the formatPriceNumber() so that I can implement it by myself without being bound to the primary symbol?

    - Clearpicks

  • #2
    Hello clearpicks,

    To format a number to suit your specific needs use Math.round() or the .toFixed(#)*1 methods. If you need to move the decimal around you can multiply or divide by 10, 100 etc. and then apply rounding.
    Jason K.
    Project Manager
    eSignal - an Interactive Data company

    EFS KnowledgeBase
    JavaScript for EFS Video Series
    EFS Beginner Tutorial Series
    EFS Glossary
    Custom EFS Development Policy

    New User Orientation

    Comment


    • #3
      JasonK,

      Thank you for the reply.

      Do you have idea how to pass the stop prices to buyStop() and sellStop()? I have been struggling with this issue for quite a while.

      - Clearpicks.


      Originally posted by JasonK
      Hello clearpicks,

      To format a number to suit your specific needs use Math.round() or the .toFixed(#)*1 methods. If you need to move the decimal around you can multiply or divide by 10, 100 etc. and then apply rounding.

      Comment


      • #4
        You're most welcome. Please see your other thread for a response to that question.
        Jason K.
        Project Manager
        eSignal - an Interactive Data company

        EFS KnowledgeBase
        JavaScript for EFS Video Series
        EFS Beginner Tutorial Series
        EFS Glossary
        Custom EFS Development Policy

        New User Orientation

        Comment


        • #5
          IB Demo account - old prices....

          Clearpicks,

          You mentioned the IB Demo account.

          Something I discovered yesterday using the IB demo account is that the price data used for that account is actually a week old.

          I was running an automated strategy using signals based off an EFS loaded into an eSignal chart and the prices recordered for buys and sells are a week old.

          If you have a real IB account you can setup a "test" account which uses a live price feed.

          Just wanted to let you know.

          Glen
          Last edited by demarcog; 01-17-2007, 09:50 AM.
          Glen Demarco
          [email protected]

          Comment


          • #6
            IB Demo acct vs IB Paper Trading (Simulated)

            Originally posted by demarcog
            ... the IB demo account [uses] price data ... a week old.
            If you have a real IB account you can setup a "test" account which uses a live price feed.
            Glen
            Hi Glen,

            Thanks for mentioning IB's "other" demo account option

            In addition to the public demo account, IB provides their clients the option of creating a Paper Trading (or Simulated) account that replicates their production account (balances, data feeds, routing, etc.).

            Information about this account, and registration instructions, can be found here:
            http://www.interactivebrokers.com/en...aperTrader.php

            Thanks again,

            Brent
            Integrated Trading Product Management
            QuoteTrader
            Trading Services email

            Comment

            Working...
            X