非农挂单
by zhuoqiang
HTML
<div>非农挂单公式: 提前2分钟 (21:28分) 按当时卖价 X 挂单
<hr/>手快:
<ul>
<li>X+30 多, 损 X+10, 赢 X+60</li>
<li>X-25 空, 损 X- 5, 赢 X-55</li>
</ul>手慢 各多加 5 点
<ul>
<li>X+35 多, 损 X+15, 盈 X+65</li>
<li>X-30 空, 损 X-10, 赢 X-60</li>
</ul>止赢也可多加 5 ~ 10 点. 半仓止赢,半仓博利.
<ul>
<li>模拟2012.11 到 2013.12, 最优策略为以 27分钟收盘价 X 为准, X+16挂, 损 X-20, 盈 X+90, 15分钟后收损至开仓价-11 (X+5), 或等至收盘前手动平仓</li>
</ul>
</div>
<hr />
<div>本金:
<input type="text" id="money" />
</div>
<div>卖价:
<input type="text" id="sell_price" />
</div>
<div>挂单价:
<input type="text" id="entry" value="16" />
</div>
<div>止损价:
<input type="text" id="stop" value="-20" />
</div>
<div>止赢价:
<input type="text" id="limit" value="90" />
</div>
<div>移损价:
<input type="text" id="move" value="11" />
</div>
<table>
<tr>
<th id='volume'>?手</th>
<th class="entry">挂单</th>
<th class="stop">止损</th>
<th class="limit">止盈</th>
<th class="move_stop">移损</th>
</tr>
<tr class="buy">
<td>买多</td>
<td class="entry"></td>
<td class="stop"></td>
<td class="limit"></td>
<td class="move_stop"></td>
</tr>
<tr class="sell">
<td>卖空</td>
<td class="entry"></td>
<td class="stop"></td>
<td class="limit"></td>
<td class="move_stop"></td>
</tr>
</table>
最大可能亏损: <span class="stop" id="lost">0</span>
<hr />先挂半对带止赢的多空单, 再挂半对放开止赢的多空单. 完成后:
<ol>
<li>细心检查: 单数,方向,点位,半仓止赢是否都正确. 静待行情爆发</li>
<li>行情出现后,反方向挂单立即取消,同向仓位调止损到盈亏平衡点</li>
<li>查看非农数据,判断多空</li>
<li>若数据多空明确, 通过黄金分割算出加仓位置, 金字塔加仓</li>
<li>通过黄金线和阻力位计算下一止赢点, 分批退出</li>
<li>如果ADP等前趋数据有矛盾的话, 行情可能会出现来回扫, 这时用锁单方式比较合适</li>
</ol>
CSS
table, th, td {
border: 1px solid gray;
font-weight: bold;
padding: 5px;
margin: 5px;
}
.entry {
color: blue;
}
.stop {
color: red;
}
.limit {
color: green;
}
JavaScript
$('#sell_price, #money').on("change keyup paste", function () {
var sell = parseInt($('#sell_price').val(), 10);
var buy = sell + 5; // 买卖点差5点
var entry = parseInt($('#entry').val(), 10);
var stop = parseInt($('#stop').val(), 10);
var limit = parseInt($('#limit').val(), 10); // 55 ~ 70
var move_stop = entry - parseInt($('#move').val(), 10);;
var leverage = 0.03
var money = parseInt($('#money').val(), 10);
var volume = money / (10*buy*leverage) / 2
$('#volume').text('各'+volume.toFixed(1)+'手'+Math.floor(volume))
volume = Math.floor(volume);
$('.buy > .entry').text(buy + entry);
$('.buy > .stop').text(buy + stop);
$('.buy > .limit').text(buy + limit);
$('.buy > .move_stop').text(buy + move_stop);
$('.sell > .entry').text(sell - entry);
$('.sell > .stop').text(sell - stop);
$('.sell > .limit').text(sell - limit);
$('.sell > .move_stop').text(sell - move_stop);
var max_lost = -2*volume*(10*(entry-stop)+entry/10.0);
$('#lost').text('¥ ' + Math.floor(max_lost));
});