Support Board
Date/Time: Sat, 01 Mar 2025 10:34:51 +0000
Post From: Assign a different value to "Last" data using a formula (realtime)
[2021-09-24 13:41:23] |
Vasek - Posts: 3 |
Hello! I trade some kind of very non-volatile instruments (calendar futures spreads). Several ticks there are a fairly large movement, and the change in the ratio of the bid and ask quantity in the order book is also quite important (but is not reflected in any way on standard charts). I would like to create a custom chart in which the "Last" value will be assigned not to the last traded bid or ask price, but to the weighted average by the quantity of orders on the bid and ask. (For example: The Bid price is 5, and the Ask price is 6. The quantity on the Bid is 100, the quantity on the Ask is 300. Then the "Last" price on the chart will be 5.25 (Using the simple formula: Last = (Bid price * Ask quantity + Ask price * Bid quantity) / (Bid quantity + Ask quantity). If the Bid quantity increases from 100 to 300, then the price on the chart will move to 5.5, etc.) I know this can be done manually by exporting, transforming and importing data (if bid and ask volumes were recorded), but I need to do it in real time (my data source is IQFeed). I am new to Sierra Chart and I don't know if I can somehow do this in real time in your terminal. I would be grateful for your answer. |