2025年12月衍生性金融商品作業
canvas繪圖套件繪製選擇權到期日損益圖 選擇權價差交易策略 清空 賣權put空頭價差 買權call多頭價差 賣權put多頭價差 買權call空頭價差 以上程式碼在下面,你們複製、貼上,再去修改 <style> canvas{border:20px} option{font-size:24px;background:pink;} h1{background-image: linear-gradient(orange, blue);text-align:center;padding:10px;color:white;}</style> <script> function dashed(){ const c = document.getElementById("Options"); const ctx = c.getContext("2d"); ctx.beginPath(); ctx.moveTo(100,0); ctx.lineTo(100,500); ctx.strokeStyle="green"; ctx.setLineDash([10,10]); ctx.lineWidth=1; ctx.stroke(); ctx.beginPath(); ctx.moveTo(200,0); ctx.lineTo(200,500); ctx.strokeStyle="green"; ctx.setLineDash([10,10]); ctx.lineWidth=1; ctx.stroke(); } function putBear(){ const c = document.getElementById("Options"); const ctx = c.getContext("2d"); ctx.reset(); ctx.beginPath(); //開始繪製 ctx.moveTo(100, 0); ctx.lineTo(200, 100); ctx.lineTo(300,100); ctx.font = "24px Ari...
留言
張貼留言