hedging自定义 双边单数和手数定义不严谨
<div class="ce-block ce-block--focused" data-id="S9yUn8ESMR" ><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_S9yUn8ESMR" class="image-tool__image-picture _zoom" src="https://www.eabang.com/bbs/data/attachment/forum/202607/29/163610rkueeo0grr7zgnun.png" title="" alt="" data-aid="8344"/>
</div>
<div class="cdx-input image-tool__caption" data-placeholder=""></div>
</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="rHcRiX_J21" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">希望大家一起讨论一下这个问题:</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="nDHxV_tWGk" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">举个例子很简单一个对冲策略,第一种情况多单首单,行情顺势就加仓变2单,既然顺势我保本盈利就行,无需转换策略。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="L26Uc8lscM" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">第二种情况多单首单,行情逆势就空单加1单,这样多空也共2单,逆势的时候就转换策略进行多空互相对冲。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="KuY5Siq5S2" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">但是目前这个双边定义会把单边顺势2单也定义为双边两单,然后也去转换对冲策略,这就不对了,它没有管空单的数量,这是不严谨的,不是真正意义的多空双边,所以这地方希望修正一下。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="-RGdLzMy3T" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">因为这个ea本身就是基于都空对冲编辑的,所以多空都真正有订单的时候去定义是否转换另一个策略是用的最多的。</div>
</div>
</div><div class="ce-block ce-block--focused" data-id="4iOJYahudj" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">手数定义也估计有这个问题</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">
.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> 这个需求最开始是我提的,我提的需求里对于双边的定义就是基于多+空的总单数/总手数。
单边就是任一一边的单数/总手数。
我认为你这个最多叫当前设置不能实现你的策略要求,不能称之为定义不严谨。
整个对冲马丁里对于双边的定义都是单+空的加总,而不是要求两边都有才叫双边 这个其实很明确的,双边就是:多+空
单边就是:多 或 空
你现在要的是双边:多+空,并且多>0+空>0,搞复杂了,亲。 <div class="ce-block ce-block--focused" data-id="sL7VGh5K29" >
<div class="ce-block__content">
<div class="ce-paragraph cdx-block ce-paragraph--left">如果只有一边订单满足双边定义的单数,使用场景多吗,我感觉还是多空都有订单才能真正让这个双边起到它真正的作用。我认为很多人对冲的时候肯定多空订单都是存在的,才去转换,这是使用最多的场景,我建议老师这里还是要纠正一下,加上一个开关吧空>=和多>=,既然这个功能开发出来了,像我这种使用的肯定以后也很多。</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]