Support Board
Date/Time: Wed, 29 Oct 2025 16:01:07 +0000
Post From: [ACSIL] float conversions
| [2013-12-18 15:46:14] |
| jackw - Posts: 57 |
|
You can eliminate the cumulative effect of the float inaccuracies by working with price in ticks. int highestHigh = Round(sc.BaseData[SC_HIGH][sc.Index] / sc.TickSize); int lowestLow = Round(sc.BaseData[SC_LOW][sc.Index] / sc.TickSize); for(int price = lowestLow; price <= highestHigh; price++) { myDrawFunction((float)price * sc.TickSize); } |
