# Bug: Drawing Objects Shifted on Lower Timeframes
Hello Volfix Team,
Drawing objects are projected to the preceding lower-timeframe bars instead of the bars contained in the source candle.
| Projection | Source candle | Wrong result | Correct result || --- | ---- | --- | --- || M15 -> M3 | 08:45 | 08:33–08:45 | 08:45–08:57 || M3 -> M1 | 08:57 | 08:55–08:57 | 08:57–08:59 |
The implementation therefore apparently treats the source timestamp t as the end of the source candle:
-
wrongStart= t -sourceTF+targetTF -
End= t +targetTF
Example M15 -> M3:
-
wrongStart = 08:45 - 15m + 3m = 08:33=> 08:33, 08:36, 08:39, 08:42, 08:45
It must instead treat t as the start of the candle:
-
correctStart= t -
correctEnd= t +sourceTF
Example M15 -> M3:
- [08:45, 09:00) => 08:45, 08:48, 08:51, 08:54, 08:57
Example M3 -> M1:
- [08:57, 09:00) => 08:57, 08:58, 08:59
General Fix
Drawing coordinates should represent absolute time intervals:
-
sourceInterval= [startTime,endTime)
For projection to a lower timeframe, display every target candle whose interval overlaps it:
-
targetStart < endTimeAND
-
targetEnd>startTime
Do not derive the position from bar indices or by counting backwards from the source timestamp.
This time-based rule also avoids assumptions about divisible timeframes. In contrast to Gantt charts, where the problem can be avoided by enforcing one common time grid, chart drawings must preserve their absolute time coordinates when displayed on different timeframes.



الرجاء تسجيل الدخول لترك تعليق.
تعليقات
لا توجد تعليقات