Easy Language Questions

Discussion in 'App Development' started by Steve Alexander, Jul 26, 2017.

  1. I have been programming in TradeStation's Easy Language for over 10 years. Lately, I wanted to reference the most recent price of a trade within a strategy. I thought it would be easy. It is not. I have even resorted to asking several of my EL buddies, and so far, nobody knows.


    buy 100 shares next bar at market;

    How can I reference the price I got filled at = ???

    All help graciously received and appreciated.
  2. dartmus


    var: ep(0);


    if you need further help, right click on the entryprice reserved word from within a strategy and select definition.
  3. stu


    should that be


    or is it (1) in TS6

    Last edited: Jul 27, 2017
  4. dartmus


    entryprice(0) is the current open position.
    entryprice(1) is the most recent closed position.

    The recent versions do not use square brackets so it's likely always been that way due to the need to maintain backward compatibility.
  5. stu


    so () for referencing a reserved word parameter... such as entryprice(1)
    and [] in older versions for referencing a bars back value... like High[1] high price one bar ago

    interesting and just a bit confusing as High is also a reserved word.

    many thanks.
  6. JSOP


    You just need to use the reserved word EntryPrice. This is what EL programming guide has to say about that:


    EntryPrice returns the entry price for the current position. It can also report what the entry price was N closed positions ago.
  7. I read the Easy Language books. EntryPrice does not work as advertised. Got any other suggestions?
  8. O(1)


    what does Last hold?
  9. "Last" holds the last price at which the stock traded. For an instant, it will hold your price; then the next trade comes along.
  10. O(1)


    Ah. What did they say when you contacted them telling them that EntryPrice doesn't work as explained in the Reserved Words & Functions Help
    #10     Aug 12, 2017