ESPL: Streaming custom symbol example
|
Q: How do I make an ESPL custom symbol update with each new tick? The ones created under menu Set-Up | Custom Symbol stream, updating with each new quote. Can I make mine in ESPL update with each new quote instead of using a Timer event to sample the data? If so, sample script? Thanks.
A: This example should be sufficient for you to implement a streaming custom symbol in ESPL.
As written, I click ESPL button 1 to activate the AlertEvent which will fire an ESPL=80 execution with every tick that is received by either symbol. Add additional AlertEvents in this first section to tag each symbol that is to participate in firing an ESPL execution when its tick is received.
Click ESPL button #2 to turn off these AlertEvents.
The code in the ESPL=80 block shows how to retrieve prices, perform adjustments, and then Update a custom symbol with a price, volume, and scale factor. Scale = 2 is the format ###.## with 2 decimals. TradeVolume is being force to be a 1 in the example.
Last modified 1/29/08 11:41 AM
|