How to convert the price difference into a whole number? - page 4 1234 New comment Ivan Negreshniy 2018.09.28 13:59 #31 Fernando Carreiro: Yes, that is a solution. In that case you can simple use a the actual sign (+/-) of the whole value to determine the direction in a quick way.And (Low - Open) change to (Open - Low) to always be positive [Deleted] 2018.09.28 14:02 #32 Ivan Negreshniy: Yes, and to determine the direction of the bar, we can put in the first position (Close-Open)Here is the alternative simpler way with only positive values for deltas, except the close OHLC: 1.21031/ 1.21054 / 1.21029 / 1.21030 becomes -000100230002121031Close - Open (points): 121030 - 121031 = -1 is -0001 converted into signed 4 decimal value (with +/- sign)High - Open (points): 121054 - 121031 = 23 is 0023 converted into unsigned 4 decimal value (always positive)Open - Low (points): 121031 - 121029 = 2 is 0002 converted into unsigned 4 decimal value (always positive)Open (points): 121031 converted into unsigned 6 decimal value Unsigned 4 decimal value (0-9999 positive) Increase decimal values till How to get BID Live Testing reports Ivan Negreshniy 2018.09.28 14:04 #33 Fernando Carreiro: Here is the alternative simpler way with only positive values for deltas, except the close OHLC: 1.21031/ 1.21054 / 1.21029 / 1.21030 becomes -000100230002121031Close - Open (points): 121030 - 121031 = -1 is -0001 converted into signed 4 decimal valueHigh - Open (points): 121054 - 121031 = 23 is 0023 converted into unsigned 4 decimal value (always positive)Open - Low (points): 121031 - 121029 = 2 is 0002 converted into unsigned 4 decimal value (always positive)Open (points): 121031 converted into unsigned 6 decimal value Unsigned 4 decimal value (0-9999 positive)thanks again, i will experiment) 1234 New comment
Yes, that is a solution. In that case you can simple use a the actual sign (+/-) of the whole value to determine the direction in a quick way.
Here is the alternative simpler way with only positive values for deltas, except the close
OHLC: 1.21031/ 1.21054 / 1.21029 / 1.21030 becomes -000100230002121031
Unsigned 4 decimal value (0-9999 positive)
Here is the alternative simpler way with only positive values for deltas, except the close
OHLC: 1.21031/ 1.21054 / 1.21029 / 1.21030 becomes -000100230002121031
Unsigned 4 decimal value (0-9999 positive)