|
@@ -187,12 +187,12 @@ $(document).ready(() => {
|
|
|
const materialCol = {
|
|
|
getValue: {
|
|
|
msg_spread: function (data) {
|
|
|
- return ZhCalc.round(ZhCalc.sub(data.msg_tp, data.basic_price), 2);
|
|
|
+ return ZhCalc.round(ZhCalc.sub(data.msg_tp, data.basic_price), 3);
|
|
|
},
|
|
|
m_spread : function (data) {
|
|
|
const msg_spread = materialCol.getValue.msg_spread(data);
|
|
|
const cor = msg_spread >= 0 ? ZhCalc.mul(data.basic_price, ZhCalc.div(data.m_up_risk, 100)) : ZhCalc.mul(data.basic_price, ZhCalc.div(data.m_down_risk, 100));
|
|
|
- return Math.abs(msg_spread) > Math.abs(cor) ? (msg_spread > 0 ? ZhCalc.round(ZhCalc.sub(msg_spread, cor), 2) : ZhCalc.round(ZhCalc.add(msg_spread, cor), 2)) : 0;
|
|
|
+ return Math.abs(msg_spread) > Math.abs(cor) ? (msg_spread > 0 ? ZhCalc.round(ZhCalc.sub(msg_spread, cor), 3) : ZhCalc.round(ZhCalc.add(msg_spread, cor), 3)) : 0;
|
|
|
},
|
|
|
m_tp: function (data) {
|
|
|
return ZhCalc.round(ZhCalc.mul(materialCol.getValue.m_spread(data), data.quantity), 2);
|