フィナボッチ
<script language="JavaScript">
<!--
//フィボナッチ計算機 by「投資の杜」 <http://stock.kikuchisan.net/ >
function fibonacci(){
sta=parseFloat(document.fibo.val1.value);
end=parseFloat(document.fibo.val2.value);
if (isNaN(sta) || isNaN(end)) {alert("数字は半角で入力してください");}
else {
if (sta <= end) {
temp1=" 38.2% 押し: "+Math.round(((sta-end)* 38.2/100+end)*10000)/10000;
temp2=" 50.0% 押し: "+Math.round(((sta-end)* 50.0/100+end)*10000)/10000;
temp3=" 61.8% 押し: "+Math.round(((sta-end)* 61.8/100+end)*10000)/10000;
} else {
temp3=" 38.2% 戻し: "+Math.round(((sta-end)* 38.2/100+end)*10000)/10000;
temp2=" 50.0% 戻し: "+Math.round(((sta-end)* 50.0/100+end)*10000)/10000;
temp1=" 61.8% 戻し: "+Math.round(((sta-end)* 61.8/100+end)*10000)/10000;
}
document.fibo.retrace1.value= temp1;
document.fibo.retrace2.value= temp2;
document.fibo.retrace3.value= temp3;
}
}
//-->
</script>
<font style="color:#746659;font-size:12px;font-weight:bolder">フィボナッチ計算機</font><br>
<table cellpadding="0" cellspacing="0" border="0"><tr><form name="fibo"><td align="right"><input type="text" name="val1" size="6" style="color:#746659;font-size:12px;width:45;height:17" /><font style="color:#746659;font-size:12px"> → </font><input type="text" name="val2" size="6" style="color:#746659;font-size:12px;width:45;height:17" /> <input type="button" value="計算" onClick="fibonacci()" style="color:#746659;font-size:12px;width:40;height:19" /><input type="button" value="?" onClick="alert('[下値]→[上値]で”押し” [上値]→[下値]で”戻し”を\n計算します\n\n[下値]と[上値]に[123.40]のように半角数値を入力して\n[計算]ボタンを押すと[結果]にフィボナッチを表示します\n----------------------------------------------\nフィボナッチ計算機 by「投資の杜」<http://stock.kikuchisan.net/>' );" style="color:#746659;font-size:12px;width:19;height:19" /><br /><input type="text" name="retrace1" size="20" style="color:#746659;font-size:12px;width:130;height:17" /><br /><font style="color:#746659;font-size:12px">結果: </font><input type="text" name="retrace2" size="20" style="color:#746659;font-size:12px;width:130;height:17" /><br /><input type="text" name="retrace3" size="20" style="color:#746659;font-size:12px;width:130;height:17" /><br /><a href="http://stock.kikuchisan.net/fibonacci.html " target="_blank"><font style="color:#746659;font-size:10px">by Investor's Forest</font></a></td></form></tr></table>
<!--
//フィボナッチ計算機 by「投資の杜」 <http://stock.kikuchisan.net/ >
function fibonacci(){
sta=parseFloat(document.fibo.val1.value);
end=parseFloat(document.fibo.val2.value);
if (isNaN(sta) || isNaN(end)) {alert("数字は半角で入力してください");}
else {
if (sta <= end) {
temp1=" 38.2% 押し: "+Math.round(((sta-end)* 38.2/100+end)*10000)/10000;
temp2=" 50.0% 押し: "+Math.round(((sta-end)* 50.0/100+end)*10000)/10000;
temp3=" 61.8% 押し: "+Math.round(((sta-end)* 61.8/100+end)*10000)/10000;
} else {
temp3=" 38.2% 戻し: "+Math.round(((sta-end)* 38.2/100+end)*10000)/10000;
temp2=" 50.0% 戻し: "+Math.round(((sta-end)* 50.0/100+end)*10000)/10000;
temp1=" 61.8% 戻し: "+Math.round(((sta-end)* 61.8/100+end)*10000)/10000;
}
document.fibo.retrace1.value= temp1;
document.fibo.retrace2.value= temp2;
document.fibo.retrace3.value= temp3;
}
}
//-->
</script>
<font style="color:#746659;font-size:12px;font-weight:bolder">フィボナッチ計算機</font><br>
<table cellpadding="0" cellspacing="0" border="0"><tr><form name="fibo"><td align="right"><input type="text" name="val1" size="6" style="color:#746659;font-size:12px;width:45;height:17" /><font style="color:#746659;font-size:12px"> → </font><input type="text" name="val2" size="6" style="color:#746659;font-size:12px;width:45;height:17" /> <input type="button" value="計算" onClick="fibonacci()" style="color:#746659;font-size:12px;width:40;height:19" /><input type="button" value="?" onClick="alert('[下値]→[上値]で”押し” [上値]→[下値]で”戻し”を\n計算します\n\n[下値]と[上値]に[123.40]のように半角数値を入力して\n[計算]ボタンを押すと[結果]にフィボナッチを表示します\n----------------------------------------------\nフィボナッチ計算機 by「投資の杜」<http://stock.kikuchisan.net/>' );" style="color:#746659;font-size:12px;width:19;height:19" /><br /><input type="text" name="retrace1" size="20" style="color:#746659;font-size:12px;width:130;height:17" /><br /><font style="color:#746659;font-size:12px">結果: </font><input type="text" name="retrace2" size="20" style="color:#746659;font-size:12px;width:130;height:17" /><br /><input type="text" name="retrace3" size="20" style="color:#746659;font-size:12px;width:130;height:17" /><br /><a href="http://stock.kikuchisan.net/fibonacci.html " target="_blank"><font style="color:#746659;font-size:10px">by Investor's Forest</font></a></td></form></tr></table>