Support Board
Date/Time: Mon, 25 Nov 2024 02:24:33 +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); } |