Skip to main content
added 763 characters in body
Source Link
Kagaratsch
  • 12.1k
  • 4
  • 25
  • 75

I use CandlestickChart to display some price data. The data is only 30 seconds long and contains one candle per second. I'd like the chart to display a separate tick on the x-axis for every single second. I tried:

CandlestickChart[data, TargetUnits -> {"Seconds", "Dollars"}]

enter image description here

enter image description here

Unfortunately, as you can see the chart still shows just vague regions for minutes on the x-axis. Which syntax can I use to make it show year-month-day-hour-minute-second for each candle?

PS: The data is in the following format for each candle:

data = {
           ... ,
           {{year,month,day,hour,minute,second},{open, high,low,close,volume}},
           ...
        }

EDIT:

Example data (not the same as in picture above):

data = { {{2022,9,15,15,43,50},{5, 6,4,5,1}},
         {{2022,9,15,15,43,51},{5, 6,4,5,1}},
         {{2022,9,15,15,43,52},{5, 6,4,5,1}},
         {{2022,9,15,15,43,53},{5, 6,4,5,1}},
         {{2022,9,15,15,43,54},{5, 6,4,5,1}},
         {{2022,9,15,15,43,55},{5, 6,4,5,1}},
         {{2022,9,15,15,43,56},{5, 6,4,5,1}},
         {{2022,9,15,15,43,57},{5, 6,4,5,1}},
         {{2022,9,15,15,43,58},{5, 6,4,5,1}},
         {{2022,9,15,15,43,59},{5, 6,4,5,1}},
         {{2022,9,15,15,44,00},{5, 6,4,5,1}},
         {{2022,9,15,15,44,01},{5, 6,4,5,1}} };

I imagine if the plot works for this data, it will work for my actual data as well.

I use CandlestickChart to display some price data. The data is only 30 seconds long and contains one candle per second. I'd like the chart to display a separate tick on the x-axis for every single second. I tried:

CandlestickChart[data, TargetUnits -> {"Seconds", "Dollars"}]

enter image description here

Unfortunately, as you can see the chart still shows just vague regions for minutes on the x-axis. Which syntax can I use to make it show year-month-day-hour-minute-second for each candle?

PS: The data is in the following format for each candle:

data = {
           ... ,
           {{year,month,day,hour,minute,second},{open, high,low,close,volume}},
           ...
        }

I use CandlestickChart to display some price data. The data is only 30 seconds long and contains one candle per second. I'd like the chart to display a separate tick on the x-axis for every single second. I tried:

CandlestickChart[data, TargetUnits -> {"Seconds", "Dollars"}]

enter image description here

Unfortunately, as you can see the chart still shows just vague regions for minutes on the x-axis. Which syntax can I use to make it show year-month-day-hour-minute-second for each candle?

PS: The data is in the following format for each candle:

data = {
           ... ,
           {{year,month,day,hour,minute,second},{open, high,low,close,volume}},
           ...
        }

EDIT:

Example data (not the same as in picture above):

data = { {{2022,9,15,15,43,50},{5, 6,4,5,1}},
         {{2022,9,15,15,43,51},{5, 6,4,5,1}},
         {{2022,9,15,15,43,52},{5, 6,4,5,1}},
         {{2022,9,15,15,43,53},{5, 6,4,5,1}},
         {{2022,9,15,15,43,54},{5, 6,4,5,1}},
         {{2022,9,15,15,43,55},{5, 6,4,5,1}},
         {{2022,9,15,15,43,56},{5, 6,4,5,1}},
         {{2022,9,15,15,43,57},{5, 6,4,5,1}},
         {{2022,9,15,15,43,58},{5, 6,4,5,1}},
         {{2022,9,15,15,43,59},{5, 6,4,5,1}},
         {{2022,9,15,15,44,00},{5, 6,4,5,1}},
         {{2022,9,15,15,44,01},{5, 6,4,5,1}} };

I imagine if the plot works for this data, it will work for my actual data as well.

Source Link
Kagaratsch
  • 12.1k
  • 4
  • 25
  • 75

`CandlestickChart` how to display a separate x-axis tick for every single second?

I use CandlestickChart to display some price data. The data is only 30 seconds long and contains one candle per second. I'd like the chart to display a separate tick on the x-axis for every single second. I tried:

CandlestickChart[data, TargetUnits -> {"Seconds", "Dollars"}]

enter image description here

Unfortunately, as you can see the chart still shows just vague regions for minutes on the x-axis. Which syntax can I use to make it show year-month-day-hour-minute-second for each candle?

PS: The data is in the following format for each candle:

data = {
           ... ,
           {{year,month,day,hour,minute,second},{open, high,low,close,volume}},
           ...
        }