Warning: Undefined variable $cat_id in /home/c8584124/public_html/namiten.jp/wp-content/themes/jinr/single.php on line 60

Warning: Undefined variable $cat_id in /home/c8584124/public_html/namiten.jp/wp-content/themes/jinr/single.php on line 60

Warning: Undefined variable $cat_id in /home/c8584124/public_html/namiten.jp/wp-content/themes/jinr/single.php on line 60

Warning: Undefined variable $cat_id in /home/c8584124/public_html/namiten.jp/wp-content/themes/jinr/single.php on line 60
PRあり

ドル円チャート

namiten

const upColor = ‘#ec0000’;
const upBorderColor = ‘#8A0000’;
const downColor = ‘#00da3c’;
const downBorderColor = ‘#008F28’;
// Each item: open,close,lowest,highest
const data0 = splitData([
[‘2024/1/31’, 147.61, 147.25, 146.02, 147.9],
[‘2024/2/1’, 147.17, 146.34, 145.91, 147.17],
[‘2024/2/2’, 146.34, 148.31, 146.25, 148.58],
[‘2024/2/5’, 148.35, 148.66, 148.27, 148.89],
[‘2024/2/6’, 148.65, 147.84, 147.82, 148.79],
[‘2024/2/7’, 147.85, 148.18, 147.65, 148.26],
[‘2024/2/8’, 148.18, 149.32, 147.94, 149.48],
[‘2024/2/9’, 149.31, 149.29, 149.02, 149.57],
[‘2024/2/13’, 149.34, 150.77, 149.27, 150.89],
[‘2024/2/14’, 150.77, 150.57, 150.35, 150.82],
[‘2024/2/15’, 150.57, 149.97, 149.58, 150.63],
[‘2024/2/16’, 149.97, 150.21, 149.83, 150.65],
[‘2024/2/19’, 150.21, 150.14, 149.88, 150.3],
[‘2024/2/20’, 150.14, 149.97, 149.69, 150.44],
[‘2024/2/21’, 149.97, 150.2, 149.86, 150.39],
[‘2024/2/22’, 150.19, 150.5, 150.02, 150.69],
[‘2024/2/26’, 150.52, 150.7, 150.3, 150.84],
[‘2024/2/27’, 150.68, 150.48, 150.09, 150.73],
[‘2024/2/28’, 150.5, 150.69, 150.38, 150.84],
[‘2024/2/29’, 150.69, 149.93, 149.21, 150.71],
[‘2024/3/1’, 149.91, 150.13, 149.91, 150.71],
[‘2024/3/4’, 150.04, 150.53, 149.84, 150.57],
[‘2024/3/5’, 150.53, 149.92, 149.71, 150.55],
[‘2024/3/6’, 149.92, 149.38, 149.1, 150.09],
[‘2024/3/7’, 149.37, 148.07, 147.6, 149.45],
[‘2024/3/8’, 148.07, 147.08, 146.5, 148.11],
[‘2024/3/11’, 147.07, 146.94, 146.49, 147.17],
[‘2024/3/12’, 146.94, 147.67, 146.62, 148.11],
[‘2024/3/13’, 147.69, 147.76, 147.23, 148.05],
[‘2024/3/14’, 147.71, 148.3, 147.44, 148.36],
[‘2024/3/15’, 148.33, 149.16, 148.04, 149.06],
[‘2024/3/18’, 148.98, 149.33, 148.91, 149.17],
[‘2024/3/19’, 149.17, 150.96, 149.03, 150.85],
[‘2024/3/21’, 151.29, 151.75, 150.28, 151.61],
[‘2024/3/22’, 151.62, 151.85, 151.01, 151.44],
[‘2024/3/25’, 151.45, 151.54, 151.06, 151.42],
[‘2024/3/26’, 151.42, 151.6, 151.21, 151.55],
[‘2024/3/27’, 151.54, 151.97, 151.03, 151.31],
[‘2024/3/28’, 151.32, 151.54, 151.15, 151.37],
[‘2024/3/29’, 151.39, 151.5, 151.18, 151.33],
[‘2024/4/1’, 151.35, 151.77, 151.23, 151.65],
[‘2024/4/2’, 151.67, 151.8, 151.47, 151.56],
[‘2024/4/3’, 151.56, 151.95, 151.45, 151.7],
[‘2024/4/4’, 151.7, 151.77, 151.12, 151.35],
[‘2024/4/5’, 151.35, 151.75, 150.82, 151.63],
[‘2024/4/8’, 151.65, 151.94, 151.58, 151.84],
[‘2024/4/9’, 151.85, 151.94, 151.58, 151.78],
[‘2024/4/10’, 151.78, 153.24, 151.69, 153.16],
[‘2024/4/11’, 153.18, 153.32, 152.76, 153.28],
[‘2024/4/12’, 153.27, 153.38, 152.6, 153.27],
[‘2024/4/15’, 153.07, 154.44, 152.98, 154.27],
[‘2024/4/16’, 154.28, 154.79, 154.14, 154.73],
[‘2024/4/17’, 154.69, 154.75, 154.16, 154.4],
[‘2024/4/18’, 154.38, 154.68, 153.97, 154.65],
[‘2024/4/19’, 154.65, 154.68, 153.6, 154.64],
[‘2024/4/22’, 154.6, 154.85, 154.46, 154.84],
[‘2024/4/23’, 154.84, 154.88, 154.57, 154.83],
[‘2024/4/24’, 154.84, 155.37, 154.73, 155.32],
[‘2024/4/25’, 155.32, 155.74, 155.19, 155.68],
[‘2024/4/26’, 155.65, 156.16, 155.44, 156.21]
]);
function splitData(rawData) {
const categoryData = [];
const values = [];
for (var i = 0; i < rawData.length; i++) {
categoryData.push(rawData[i].splice(0, 1)[0]);
values.push(rawData[i]);
}
return {
categoryData: categoryData,
values: values
};
}
function calculateMA(dayCount) {
var result = [];
for (var i = 0, len = data0.values.length; i < len; i++) {
if (i < dayCount) {
result.push(‘-‘);
continue;
}
var sum = 0;
for (var j = 0; j < dayCount; j++) {
sum += +data0.values[i – j][1];
}
// 小数点第二位で切り捨てを行う
var average = sum / dayCount;
var roundedAverage = Math.floor(average * 100) / 100;
result.push(roundedAverage);
}
return result;
}
option = {
title: {
text: ‘ドル円(日足)’,
left: 0
},
tooltip: {
trigger: ‘axis’,
axisPointer: {
type: ‘cross’
}
},
legend: {
data: [‘日K’, ‘MA5’, ‘MA10’, ‘MA20’, ‘MA30’]
},
grid: {
left: ‘10%’,
right: ‘10%’,
bottom: ‘15%’
},
backgroundColor: ‘#FFEEE2’,

xAxis: {
type: ‘category’,
data: data0.categoryData,
boundaryGap: false,
axisLine: { onZero: false },
splitLine: { show: false },
min: ‘dataMin’,
max: ‘dataMax’,
lineStyle: {
color: ‘#4A4A4A’
}
},
yAxis: {
scale: true,
splitArea: {
show: true
},
axisLine: {
lineStyle: {
color: ‘#4A4A4A’
}
},
splitLine: {
show: true,
lineStyle: {
color: ‘#4A4A4A’
}
}
},
dataZoom: [
{
type: ‘inside’,
start: 50,
end: 100
},
{
show: true,
type: ‘slider’,
top: ‘90%’,
start: 50,
end: 100
}
],
series: [
{
name: ‘ドル円’,
type: ‘candlestick’,
data: data0.values,
itemStyle: {
color: upColor,
color0: downColor,
borderColor: upBorderColor,
borderColor0: downBorderColor
},
markPoint: {
label: {
formatter: function (param) {
return param != null ? Math.round(param.value) + ” : ”;
}
},
data: [
{
name: ‘highest value’,
type: ‘max’,
valueDim: ‘highest’
},
{
name: ‘lowest value’,
type: ‘min’,
valueDim: ‘lowest’
},
{
name: ‘average value on close’,
type: ‘average’,
valueDim: ‘close’
}
]
}
},
{
name: ‘MA5’,
type: ‘line’,
data: calculateMA(5),
smooth: true,
lineStyle: {
opacity: 0.5
}
},
{
name: ‘MA10’,
type: ‘line’,
data: calculateMA(10),
smooth: true,
lineStyle: {
opacity: 0.5
}
},
{
name: ‘MA20’,
type: ‘line’,
data: calculateMA(20),
smooth: true,
lineStyle: {
opacity: 0.5
}
},
{
name: ‘MA30’,
type: ‘line’,
data: calculateMA(30),
smooth: true,
lineStyle: {
opacity: 0.5
}
}
]
};

※SNSシェアの場合、必ず利用規約をご確認ください。
コンテンツの翻案、リンクを含まない引用・スクリーンショットの共有は法律・法令、当サイト利用規約で禁止されています。
サイト内PR

Google Newsでnamiten.jpをフォロー

namiten.jp
namiten.jp
広報
namiten.jp広報班にお問い合せがある場合、以下の通りお願いします。

当サイト掲載情報について、法的請求がある場合…お問い合わせへ
当サイト掲載情報について、不備や依頼等がある場合…メール、Twitter DM等
記事URLをコピーしました