浩博 发表于 前天 18:10

订单未平完问题

<div class="ce-block ce-block--focused" data-id="Pt20KfAfzl" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">老师你好!</div>
        </div>
</div><div class="ce-block" data-id="EmDZLOcwgb" >
        <div class="ce-block__content" style="">
                <h1 class="ce-header ce-header--left">Hedging对冲EA v6.6版本在使用累计盈利全平订单功能时,选择第一笔开仓订单按钮时,达到盈利金额全平且关闭开仓,经常出现订单未平完,剩下单边订单1个或两三个,然后达到加仓条件又开始加仓,导致持仓单边订单。(因为关闭开仓,所以另一边没有订单不会加仓)能不能达到盈利全平所有订单,关闭开仓后再发一次全平指令,因为选择从零点开始按钮偶尔也会遇到订单未平完的情况</h1>
        </div>
</div><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.ce-paragraph {
    line-height: 1.6em;
    outline: none;
    text-indent: 2em;
    font-size: 16px;
}
.ce-paragraph--right {
    text-align: right;
}
.ce-paragraph--center {
    text-align: center;
}
.ce-paragraph--left {
    text-align: left;
}

.ce-paragraph--justify {
    text-align: justify;
}

.ce-paragraph-text-indent {
    text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}

/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}

.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}

.ce-paragraph p:first-of-type{
    margin-top: 0;
}

.ce-paragraph p:last-of-type{
    margin-bottom: 0;
}


.svg-icon {
    width: 1em;
    height: 1em;
}

.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
    fill: #4691f6;
}

.svg-icon circle {
    stroke: #4691f6;
    stroke-width: 1;
}
</style><style type="text/css">
.ce-block {
        margin-top: 20px;
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
/**
* Plugin styles
*/
.ce-header {
position: relative;
padding: 1px 0px 1px 15px;
margin: 0;
line-height: 1.25em;
outline: none;
margin-bottom: 10px;
}

.ce-header p,
.ce-header div {
padding: 0 !important;
margin: 0 !important;
}
.ce-header::before {
        content: "";
        background-color: #3e8fe3;
        width: 6px;
        height: 100%;
        position: absolute;
        left: 0;
        -webkit-border-radius: 3px;
        -moz-border-radius: 3px;
        border-radius: 3px;
}
/**
* Styles for Plugin icon in Toolbar
*/
.ce-header__icon {
}

.ce-header::before {
position: absolute;
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
display: none;
cursor: text;
}

.ce-header:empty::before {
display: block;
}

.ce-header:empty:focus::before {
display: none;
}
/* FontSize */
h1.ce-header {
    font-size: 2.0em;
}
h2.ce-header {
    font-size: 1.7em;
}
h3.ce-header {
    font-size: 1.4em;
}
h4.ce-header {
    font-size: 1.15em;
}
h5.ce-header {
    font-size: 0.95em;
}
h6.ce-header {
    font-size: 0.8em;
}
/* Alignment*/
.ce-header--right {
text-align: right;
}
.ce-header--center {
text-align: center;
}
.ce-header--left {
text-align: left;
}
.ce-header--justify {
text-align: justify;
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>

唐老师 发表于 昨天 17:35

来个图嘛,亲

浩博 发表于 昨天 19:37

<div class="ce-block ce-block--focused" data-id="Lf6awh0Qi9" >
    <div class="ce-block__content">
      <div class="cdx-block image-tool image-tool--filled   ">
            <div class="image-tool__image">
                <div class="image-tool__image-preloader" style=""></div>
                <img id="aimg_Lf6awh0Qi9" class="image-tool__image-picture _zoom" src="https://www.eabang.com/bbs/data/attachment/forum/202605/10/193637iln57tg0l79xf7x5.png" title="" alt="" data-aid="8094"/>
            </div>
            <div class="cdx-input image-tool__caption" data-placeholder=""></div>
      </div>
    </div>
</div><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.image-tool {
--bg-color: #cdd1e0;
--front-color: #388ae5;
--border-color: #e8e8eb;

}

.image-tool__image {
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.image-tool__image-picture {
      max-width: 100%;
      vertical-align: bottom;
      display: block;
      margin-left: auto;
      margin-right: auto;
    }

.image-tool__image-preloader {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background-size: cover;
      margin: auto;
      position: relative;
      background-color: #cdd1e0;
      background-position: center center;
    }

.image-tool__image-preloader::after {
      content: "";
      position: absolute;
      z-index: 3;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      border: 2px solid #cdd1e0;
      border-top-color: #388ae5;
      left: 50%;
      top: 50%;
      margin-top: -30px;
      margin-left: -30px;
      animation: image-preloader-spin 2s infinite linear;
      box-sizing: border-box;
      }

.image-tool__caption::before {
      position: absolute !important;
      content: attr(data-placeholder);
      color: #707684;
      font-weight: normal;
      display: none;
    }

.image-tool__caption:empty::before {
      display: block;
      }

.image-tool__caption:empty:focus::before {
      display: none;
      }

.image-tool--empty .image-tool__image {
      display: none;
    }

.image-tool--empty .image-tool__caption, .image-tool--loading .image-tool__caption {
      display: none;
    }

.image-tool .cdx-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-tool .cdx-button svg {
      height: auto;
      margin: 0 6px 0 0;
    }

.image-tool--filled .cdx-button {
      display: none;
    }

.image-tool--filled .image-tool__image-preloader {
      display: none;
      }

.image-tool--loading .image-tool__image {
      min-height: 200px;
      display: flex;
      border: 1px solid #e8e8eb;
      background-color: #fff;
    }

.image-tool--loading .image-tool__image-picture {
      display: none;
      }

.image-tool--loading .cdx-button {
      display: none;
    }

/**
   * Tunes
   * ----------------
   */

.image-tool--withBorder .image-tool__image {
      border: 1px solid #e8e8eb;
    }

.image-tool--withBackground .image-tool__image {
      padding: 15px;
      background: #cdd1e0;
    }

.image-tool--withBackground .image-tool__image-picture {
      max-width: 60%;
      margin: 0 auto;
      }

.image-tool--stretched .image-tool__image-picture {
      width: 100%;
      }

.image-tool__caption {
                text-align: center;
                font-size: 14px;
                color: #a3a3a3;
        }
@keyframes image-preloader-spin {
0% {
    transform: rotate(0deg);
}
100% {
    transform: rotate(360deg);
}
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>

浩博 发表于 昨天 20:24

<div class="ce-block ce-block--focused" data-id="3ppaVA-Dhd" >
    <div class="ce-block__content">
      <div class="cdx-block image-tool image-tool--filled   ">
            <div class="image-tool__image">
                <div class="image-tool__image-preloader" style=""></div>
                <img id="aimg_3ppaVA-Dhd" class="image-tool__image-picture _zoom" src="https://www.eabang.com/bbs/data/attachment/forum/202605/10/202418jta2o6ott5nmf166.png" title="有一个单是未平完,一个是顺势加的" alt="有一个单是未平完,一个是顺势加的" data-aid="8095"/>
            </div>
            <div class="cdx-input image-tool__caption" data-placeholder="有一个单是未平完,一个是顺势加的">有一个单是未平完,一个是顺势加的</div>
      </div>
    </div>
</div><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.image-tool {
--bg-color: #cdd1e0;
--front-color: #388ae5;
--border-color: #e8e8eb;

}

.image-tool__image {
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.image-tool__image-picture {
      max-width: 100%;
      vertical-align: bottom;
      display: block;
      margin-left: auto;
      margin-right: auto;
    }

.image-tool__image-preloader {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background-size: cover;
      margin: auto;
      position: relative;
      background-color: #cdd1e0;
      background-position: center center;
    }

.image-tool__image-preloader::after {
      content: "";
      position: absolute;
      z-index: 3;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      border: 2px solid #cdd1e0;
      border-top-color: #388ae5;
      left: 50%;
      top: 50%;
      margin-top: -30px;
      margin-left: -30px;
      animation: image-preloader-spin 2s infinite linear;
      box-sizing: border-box;
      }

.image-tool__caption::before {
      position: absolute !important;
      content: attr(data-placeholder);
      color: #707684;
      font-weight: normal;
      display: none;
    }

.image-tool__caption:empty::before {
      display: block;
      }

.image-tool__caption:empty:focus::before {
      display: none;
      }

.image-tool--empty .image-tool__image {
      display: none;
    }

.image-tool--empty .image-tool__caption, .image-tool--loading .image-tool__caption {
      display: none;
    }

.image-tool .cdx-button {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-tool .cdx-button svg {
      height: auto;
      margin: 0 6px 0 0;
    }

.image-tool--filled .cdx-button {
      display: none;
    }

.image-tool--filled .image-tool__image-preloader {
      display: none;
      }

.image-tool--loading .image-tool__image {
      min-height: 200px;
      display: flex;
      border: 1px solid #e8e8eb;
      background-color: #fff;
    }

.image-tool--loading .image-tool__image-picture {
      display: none;
      }

.image-tool--loading .cdx-button {
      display: none;
    }

/**
   * Tunes
   * ----------------
   */

.image-tool--withBorder .image-tool__image {
      border: 1px solid #e8e8eb;
    }

.image-tool--withBackground .image-tool__image {
      padding: 15px;
      background: #cdd1e0;
    }

.image-tool--withBackground .image-tool__image-picture {
      max-width: 60%;
      margin: 0 auto;
      }

.image-tool--stretched .image-tool__image-picture {
      width: 100%;
      }

.image-tool__caption {
                text-align: center;
                font-size: 14px;
                color: #a3a3a3;
        }
@keyframes image-preloader-spin {
0% {
    transform: rotate(0deg);
}
100% {
    transform: rotate(360deg);
}
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>

konglongqqq 发表于 4 小时前

同样老师看过来,这个功能还有个问题不清晰,当开启第一笔开仓订单的时候,ea应该判断当前盘面时间最早的一笔订单,然后你关掉累计全平,或者每次切换0点开仓到第一笔开仓功能时候,ea都要去判断当前盘面时间最早的一单开始计算。但是我回测和模拟实盘,这个功能一点也不清晰。希望就是每次点击这个第一笔订单功能,ea就是以当前市价单时间最早的一笔来计算,并且当最早的一笔订单部分平仓后,它会自动判断下一笔时间最早的订单,这个很关键

konglongqqq 发表于 4 小时前

<div class="quote"><blockquote><font size="2"><a href="https://www.eabang.com/bbs/forum.php?mod=redirect&amp;goto=findpost&amp;pid=76943&amp;ptid=8312" target="_blank"><font color="#999999">唐老师 发表于 2026-5-10 17:35</font></a></font><br />
来个图嘛,亲</blockquote></div><div class="ce-block ce-block--focused" data-id="RCoBYu1S0s" >
        <div class="ce-block__content">
                <div class="ce-paragraph cdx-block ce-paragraph--left">同样老师看过来,这个功能还有个问题不清晰,当开启第一笔开仓订单的时候,ea应该判断当前盘面时间最早的一笔订单,然后你关掉累计全平,或者每次切换0点开仓到第一笔开仓功能时候,ea都要去判断当前盘面时间最早的一单开始计算。但是我回测和模拟实盘,这个功能一点也不清晰。希望就是每次点击这个第一笔订单功能,ea就是以当前市价单时间最早的一笔来计算,并且当最早的一笔订单部分平仓后,它会自动判断下一笔时间最早的订单,这个很关键</div>
        </div>
</div><style type="text/css">
.ce-block {
    margin-bottom: 20px;
}
.ce-block__content,.ce-toolbar__content {
        /* max-width:calc(100% - 50px) */
        margin-left: auto;
    margin-right: auto;
}
.ce-paragraph {
    line-height: 1.6em;
    outline: none;
    text-indent: 2em;
    font-size: 16px;
}
.ce-paragraph--right {
    text-align: right;
}
.ce-paragraph--center {
    text-align: center;
}
.ce-paragraph--left {
    text-align: left;
}

.ce-paragraph--justify {
    text-align: justify;
}

.ce-paragraph-text-indent {
    text-align: justify;
}
.ce-paragraph:empty::before{
content: attr(data-placeholder);
color: #707684;
font-weight: normal;
opacity: 0;
}

/** Show placeholder at the first paragraph if Editor is empty */
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty::before {
opacity: 1;
}

.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph:empty::before,
.codex-editor--empty .ce-block:first-child .ce-paragraph:empty:focus::before {
opacity: 0;
}

.ce-paragraph p:first-of-type{
    margin-top: 0;
}

.ce-paragraph p:last-of-type{
    margin-bottom: 0;
}


.svg-icon {
    width: 1em;
    height: 1em;
}

.svg-icon path,
.svg-icon polygon,
.svg-icon rect {
    fill: #4691f6;
}

.svg-icon circle {
    stroke: #4691f6;
    stroke-width: 1;
}
</style><style type="text/css">
.inline-code {
background: rgba(250, 239, 240, 0.78);
color: #b44437;
padding: 3px 4px;
border-radius: 5px;
margin: 0 1px;
font-family: inherit;
font-size: 0.86em;
font-weight: 500;
letter-spacing: 0.3px;
}
</style>
页: [1]
查看完整版本: 订单未平完问题