- 精华
- 1
- 在线时间
- 62 小时
- UID
- 2048
- 积分
- 218
- 帖子
- 29
- 阅读权限
- 40
- 注册时间
- 2008-8-1
- 最后登录
- 2016-8-2
- 精华
- 1
- UID
- 2048
- 积分
- 218
- 帖子
- 29
- 主题
- 8
- 阅读权限
- 40
- 注册时间
- 2008-8-1
- 最后登录
- 2016-8-2
|
文字表述的策略与实际代码似乎不一致
2、当前价格为最近前2个Bar最高价的回落,而且回落幅度大于0.382。回落幅度是相对于最高价到最低价的范围。
这段代码所表达的进场条件似乎比以上条件要更多!!
EntryCondition = ((highestValue - Open) / (highestValue - lowestValue) > TrailingSet )&& // 开盘价即满足回撤条件,用开盘价进行交易
(Open > highestValue -((highestValue - lowestValue)*StopLossSet)) ; // 开盘价不能低于预设的止损价
If( EntryCondition)
{
Buy(1,Open);
}Else // 再看其它价格是否满足
{
EntryCondition = (highestValue - Low) / (highestValue - lowestValue) > TrailingSet ; // 最低价满足回撤条件,用低于TrailingSet设置的最近价位建仓
If(EntryCondition)
{
myEntryPrice = highestValue - (HighestValue - LowestValue ) * TrailingSet;
myEntryPrice = IntPart(myEntryPrice / (PriceScale()*MinMove)) *(PriceScale()*MinMove); // 对价格进行处理
If(myEntryPrice >= low && myEntryPrice <= High)
{
Buy(1,MyEntryPrice);
请nopain做个详细的解释!!多谢!!!! |
|