工作已完成
指定
Attached is an existing indicator that superimposes (overlays) a secondary currency pair (as an indicator) on top of the primary currency pair. This indicator only scales the superimposed currency pair across a user defined fixed range from the current time. I need this indicator modified in 3 ways:
1. The superimposed (overlaid) currency pair should be scaled to the high and low prices of the primary currency pair over a range of only the visible bars. This range should not be user defined. In other words, the range to scale is dynamic and equal the currently visible bars. However, the range to scale will be offset by the shift in the visible bars of the primary currency pair such that the superimposed currency pair is only scaled to the visible prices. The high price of the superimposed currency pair should be at the same y-axis position of the high price of the primary currency pair. The low price of the superimposed currency pair should be at the same y-axis position of the low price of the primary currency pair. The scaling should be linearly proportional.
2. When the visible bars and timescale range are shifted with mouse, the superimposed currency pair needs to be dynamically redrawn to reflect the visible high and low prices of the primary currency pair.
3. To improve performance and minimize burden on the server, the price data of the superimposed currency pair should be stored in memory and redrawn to a new scale from memory so that same price data does not get polled again from the server. Only the new last price data may be polled from the server.