Announcement

Collapse
No announcement yet.

Capturing realtime price action

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

  • Capturing realtime price action

    Hi,

    I am testing a realtime trading signals efs.
    I am having trouble testing targets and stops.

    For example, if a long is triggered, a formula that checks for the first target could be:

    if(close(0) > vEntry + 0.5 ) FirstTarget = true;

    It is important for the formula to immediately trigger the “FirstTarget = true;” as soon as the target price is hit.

    Question: Does close(0) capture the price action if it crosses in real time or should I use something else like the following functions:
    PHP Code:
    getMostRecentAsk() 
    getMostRecentAskSize() 
    getMostRecentBid() 
    getMostRecentBidSize() 
    getMostRecentTrade()
    high(0)
    low(0)
    close(0
    Thanks

    wayne

  • #2
    Wayne,

    Yes, close(0) should accomplish what you want (but remember that this is relative to the esignal datafeed). I've got systems running that operate on a number of different symbols and I can tell you there are some times on the esignal chart when it TICKS above my target or below my stop when the broker price is slightly different. I assume the way to handle this is to develop code to use the broker price instead of the esignal price - but given my goals, that's not going to happen right now.

    There are also ways to control the esignal data source so that you can select specific exchanges/brokers (I know this is available for Forex). Alex or someone from esignal can probably post a knowledgebase page to assist.

    Another way to accomplish this is to fire your target order into the broker, then check to see if that order gets filled.

    When I develop an efs script, I like to use market orders (at first) because they are simple to deploy and can give me a feel for how the system operates.

    B
    Brad Matheny
    eSignal Solution Provider since 2000

    Comment


    • #3
      Thanks Brad,

      Very helpful.

      wayne

      Comment

      Working...
      X