Question 1: The eSignal doc says that "main() will be called every time the Advanced chart receives a new trade". However, it seems to me that it's only called when the new trade happens at a different price. For example, I can see on the dome that multiple trades are happening at the same price, but main() is only being called once, and it's only being called for the first trade at that price. Is this true?
Question 2: If so, this can cause some confusion when using changes in "volume()" to try to decide how much volume has occurred at different price levels. For example:
1. A trade is done on a new bar at 1452.00 for 3 contracts. The EFS is called, and volume() returns 3.
2. Additional trades are done at 1452.00 for an additional 500 contracts. The EFS is not called.
3. A trade is done at 1452.25 for 5 contracts. The EFS is called. volume() reports 508 contracts. This includes the initial 3 contracts (already reported to the EFS), the additional 500 contracts at 1452.00, and the 5 contracts done at 1452.25.
Is above the way it happens? If so, it seems that the EFS needs to use "getMostRecentTradeSize()" to determine how many of the volume() contracts were done at the new price, and allocate the rest of the volume() difference to the previous price. Is this right?
Question 2: If so, this can cause some confusion when using changes in "volume()" to try to decide how much volume has occurred at different price levels. For example:
1. A trade is done on a new bar at 1452.00 for 3 contracts. The EFS is called, and volume() returns 3.
2. Additional trades are done at 1452.00 for an additional 500 contracts. The EFS is not called.
3. A trade is done at 1452.25 for 5 contracts. The EFS is called. volume() reports 508 contracts. This includes the initial 3 contracts (already reported to the EFS), the additional 500 contracts at 1452.00, and the 5 contracts done at 1452.25.
Is above the way it happens? If so, it seems that the EFS needs to use "getMostRecentTradeSize()" to determine how many of the volume() contracts were done at the new price, and allocate the rest of the volume() difference to the previous price. Is this right?
Comment