Skip to content

Small candlesticks render without a body #800

@AlgoExecutor

Description

@AlgoExecutor

It seems that some candles are not displayed correctly. This affects only candles without a body. So-called Dojis. You can see the differences on the MS Reference Chart:

image

Version: ScottPlot 4.1.8-beta

Code:

 pData.Add(new OHLC((double) candle.open,
                        (double) candle.high,
                        (double) candle.low,
                        (double) candle.close,
                        candle.opentime,
                        1.0 / (24 * 60)
formsPlot.Plot.AddCandlesticks(pData.ToArray());
formsPlot.Plot.XAxis.DateTimeFormat(true);
formsPlot.Render();

Data:
OHLC: open=0,1353, high=0,1354, low=0,1353, close=0,1353, timestamp=44243,7229166667
OHLC: open=0,1347, high=0,1353, low=0,1346, close=0,1349, timestamp=44243,7222222222
OHLC: open=0,1344, high=0,1347, low=0,1344, close=0,1347, timestamp=44243,7215277778
OHLC: open=0,1339, high=0,1344, low=0,1339, close=0,1344, timestamp=44243,7208333333
OHLC: open=0,1334, high=0,1342, low=0,1334, close=0,1339, timestamp=44243,7201388889
OHLC: open=0,1334, high=0,1334, low=0,1329, close=0,1334, timestamp=44243,7194444444
OHLC: open=0,1334, high=0,1334, low=0,133, close=0,133, timestamp=44243,71875
OHLC: open=0,133, high=0,1334, low=0,133, close=0,1334, timestamp=44243,7180555556
OHLC: open=0,1333, high=0,1334, low=0,1329, close=0,1334, timestamp=44243,7173611111
OHLC: open=0,1337, high=0,1341, low=0,1329, close=0,1335, timestamp=44243,7166666667
OHLC: open=0,1338, high=0,1341, low=0,1334, close=0,1334, timestamp=44243,7159722222
OHLC: open=0,133, high=0,1339, low=0,133, close=0,1339, timestamp=44243,7152777778
OHLC: open=0,1334, high=0,1334, low=0,133, close=0,133, timestamp=44243,7145833333
OHLC: open=0,1341, high=0,1341, low=0,1334, close=0,1334, timestamp=44243,7138888889
OHLC: open=0,1342, high=0,1344, low=0,134, close=0,1341, timestamp=44243,7131944444
OHLC: open=0,1341, high=0,1346, low=0,1341, close=0,1342, timestamp=44243,7125
OHLC: open=0,134, high=0,1345, low=0,1339, close=0,1341, timestamp=44243,7118055556
OHLC: open=0,1341, high=0,1341, low=0,1339, close=0,1341, timestamp=44243,7111111111
OHLC: open=0,1341, high=0,1346, low=0,1336, close=0,1339, timestamp=44243,7104166667
OHLC: open=0,1333, high=0,1343, low=0,1325, close=0,134, timestamp=44243,7097222222
OHLC: open=0,131, high=0,1332, low=0,131, close=0,1332, timestamp=44243,7090277778
OHLC: open=0,1309, high=0,1316, low=0,1304, close=0,131, timestamp=44243,7083333333
OHLC: open=0,1315, high=0,1319, low=0,13, close=0,1309, timestamp=44243,7076388889
OHLC: open=0,1326, high=0,1326, low=0,1315, close=0,1315, timestamp=44243,7069444444
OHLC: open=0,1325, high=0,1327, low=0,132, close=0,132, timestamp=44243,70625
OHLC: open=0,1326, high=0,1327, low=0,1325, close=0,1327, timestamp=44243,7055555556
OHLC: open=0,1327, high=0,1327, low=0,1326, close=0,1326, timestamp=44243,7048611111
OHLC: open=0,1335, high=0,1335, low=0,1324, close=0,1326, timestamp=44243,7041666667
OHLC: open=0,1333, high=0,1339, low=0,1327, close=0,1335, timestamp=44243,7034722222
OHLC: open=0,1345, high=0,135, low=0,1327, close=0,1333, timestamp=44243,7027777778
OHLC: open=0,1353, high=0,1353, low=0,1345, close=0,1345, timestamp=44243,7020833333
OHLC: open=0,1351, high=0,1351, low=0,1349, close=0,1349, timestamp=44243,7013888889
OHLC: open=0,1358, high=0,1358, low=0,1349, close=0,135, timestamp=44243,7006944444
OHLC: open=0,1368, high=0,1368, low=0,1357, close=0,1362, timestamp=44243,7
OHLC: open=0,1376, high=0,1376, low=0,1367, close=0,1367, timestamp=44243,6993055556
OHLC: open=0,1371, high=0,1371, low=0,1371, close=0,1371, timestamp=44243,6986111111
OHLC: open=0,1378, high=0,1378, low=0,1372, close=0,1378, timestamp=44243,6979166667
OHLC: open=0,1379, high=0,138, low=0,1378, close=0,1379, timestamp=44243,6972222222
OHLC: open=0,1382, high=0,1382, low=0,137, close=0,1373, timestamp=44243,6965277778
OHLC: open=0,138, high=0,1382, low=0,1374, close=0,1382, timestamp=44243,6958333333
OHLC: open=0,1386, high=0,139, low=0,1376, close=0,1384, timestamp=44243,6951388889
OHLC: open=0,138, high=0,1385, low=0,1379, close=0,1384, timestamp=44243,6944444444
OHLC: open=0,138, high=0,138, low=0,1378, close=0,1378, timestamp=44243,69375
OHLC: open=0,1377, high=0,1384, low=0,1376, close=0,138, timestamp=44243,6930555556
OHLC: open=0,1374, high=0,1379, low=0,1373, close=0,1377, timestamp=44243,6923611111
OHLC: open=0,1359, high=0,1376, low=0,1357, close=0,1374, timestamp=44243,6916666667
OHLC: open=0,1358, high=0,1365, low=0,1355, close=0,1358, timestamp=44243,6909722222
OHLC: open=0,1359, high=0,1359, low=0,1358, close=0,1359, timestamp=44243,6902777778
OHLC: open=0,1365, high=0,1367, low=0,1354, close=0,1362, timestamp=44243,6895833333
OHLC: open=0,136, high=0,1368, low=0,1357, close=0,1368, timestamp=44243,6888888889
OHLC: open=0,1366, high=0,1366, low=0,1353, close=0,1353, timestamp=44243,6881944444
OHLC: open=0,1369, high=0,137, low=0,1365, close=0,1366, timestamp=44243,6875
OHLC: open=0,1375, high=0,1375, low=0,1366, close=0,1367, timestamp=44243,6868055556
OHLC: open=0,1385, high=0,1385, low=0,1376, close=0,1376, timestamp=44243,6861111111
OHLC: open=0,1377, high=0,1387, low=0,1377, close=0,1379, timestamp=44243,6854166667
OHLC: open=0,1383, high=0,1386, low=0,1377, close=0,1377, timestamp=44243,6847222222
OHLC: open=0,1393, high=0,14, low=0,1381, close=0,1383, timestamp=44243,6840277778
OHLC: open=0,139, high=0,1394, low=0,1387, close=0,1393, timestamp=44243,6833333333
OHLC: open=0,137, high=0,139, low=0,1369, close=0,139, timestamp=44243,6826388889
OHLC: open=0,1367, high=0,137, low=0,1367, close=0,137, timestamp=44243,6819444444
OHLC: open=0,1367, high=0,1368, low=0,1365, close=0,1367, timestamp=44243,68125
OHLC: open=0,1366, high=0,1366, low=0,1365, close=0,1365, timestamp=44243,6805555556
OHLC: open=0,1366, high=0,1369, low=0,1365, close=0,1365, timestamp=44243,6798611111
OHLC: open=0,1371, high=0,1377, low=0,1365, close=0,1366, timestamp=44243,6791666667
OHLC: open=0,138, high=0,1384, low=0,1371, close=0,1371, timestamp=44243,6784722222
OHLC: open=0,1387, high=0,1387, low=0,138, close=0,138, timestamp=44243,6777777778
OHLC: open=0,1389, high=0,1393, low=0,1384, close=0,1384, timestamp=44243,6770833333
OHLC: open=0,1394, high=0,1395, low=0,1389, close=0,1391, timestamp=44243,6763888889
OHLC: open=0,1395, high=0,1395, low=0,1387, close=0,139, timestamp=44243,6756944444
OHLC: open=0,1395, high=0,1395, low=0,1395, close=0,1395, timestamp=44243,675
OHLC: open=0,1386, high=0,1396, low=0,1386, close=0,1396, timestamp=44243,6743055556
OHLC: open=0,1391, high=0,1391, low=0,1391, close=0,1391, timestamp=44243,6736111111
OHLC: open=0,1382, high=0,1391, low=0,1382, close=0,1391, timestamp=44243,6729166667
OHLC: open=0,1393, high=0,1396, low=0,1382, close=0,1382, timestamp=44243,6722222222
OHLC: open=0,1393, high=0,1393, low=0,139, close=0,139, timestamp=44243,6715277778
OHLC: open=0,139, high=0,1396, low=0,1385, close=0,1391, timestamp=44243,6708333333
OHLC: open=0,1391, high=0,1392, low=0,139, close=0,139, timestamp=44243,6701388889
OHLC: open=0,1385, high=0,1391, low=0,1384, close=0,1391, timestamp=44243,6694444444
OHLC: open=0,1381, high=0,1388, low=0,1381, close=0,1388, timestamp=44243,66875
OHLC: open=0,1379, high=0,1387, low=0,1379, close=0,1385, timestamp=44243,6680555556
OHLC: open=0,1379, high=0,1382, low=0,1376, close=0,1378, timestamp=44243,6673611111
OHLC: open=0,138, high=0,1383, low=0,1379, close=0,1379, timestamp=44243,6666666667
OHLC: open=0,1389, high=0,1389, low=0,1379, close=0,1383, timestamp=44243,6659722222
OHLC: open=0,1386, high=0,1386, low=0,1386, close=0,1386, timestamp=44243,6652777778
OHLC: open=0,1383, high=0,1383, low=0,1382, close=0,1382, timestamp=44243,6645833333
OHLC: open=0,1385, high=0,1389, low=0,1382, close=0,1382, timestamp=44243,6638888889
OHLC: open=0,1382, high=0,1395, low=0,1382, close=0,1386, timestamp=44243,6631944444
OHLC: open=0,1382, high=0,1382, low=0,1382, close=0,1382, timestamp=44243,6625
OHLC: open=0,1387, high=0,1387, low=0,1382, close=0,1382, timestamp=44243,6618055556
OHLC: open=0,139, high=0,139, low=0,1387, close=0,1387, timestamp=44243,6611111111
OHLC: open=0,139, high=0,139, low=0,139, close=0,139, timestamp=44243,6604166667
OHLC: open=0,1389, high=0,1389, low=0,1387, close=0,1387, timestamp=44243,6597222222
OHLC: open=0,1387, high=0,1387, low=0,1386, close=0,1387, timestamp=44243,6590277778
OHLC: open=0,1387, high=0,1388, low=0,1387, close=0,1387, timestamp=44243,6583333333
OHLC: open=0,1386, high=0,1386, low=0,1386, close=0,1386, timestamp=44243,6576388889
OHLC: open=0,1387, high=0,1389, low=0,1385, close=0,1385, timestamp=44243,6569444444
OHLC: open=0,1391, high=0,1392, low=0,1387, close=0,1387, timestamp=44243,65625
OHLC: open=0,139, high=0,1391, low=0,1387, close=0,1391, timestamp=44243,6555555556
OHLC: open=0,1387, high=0,1392, low=0,1385, close=0,139, timestamp=44243,6548611111
OHLC: open=0,1391, high=0,1394, low=0,1391, close=0,1394, timestamp=44243,6541666667

Thanks! :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions