예스스탁
예스스탁 답변
2021-12-17 11:02:07
안녕하세요
예스스탁입니다.
input : 수익1(0.55),수익2(0.75);
input : loss1(0.2),loss2(0.3);
input : Tr1(0.2),Tr2(0.3);
if MarketPosition == 1 Then
{
if Highest(H,BarsSinceEntry) >= EntryPrice+수익1 and Highest(h,BarsSinceEntry) < EntryPrice+수익2 Then
{
ExitLong("bl1",AtStop,EntryPrice-loss1);
ExitLong("btr1",AtStop,Highest(h,BarsSinceEntry)-TR1);
}
if Highest(H,BarsSinceEntry) >= EntryPrice+수익2 Then
{
ExitLong("bl2",AtStop,EntryPrice-loss2);
ExitLong("btr2",AtStop,Highest(h,BarsSinceEntry)-TR2);
}
}
if MarketPosition == -1 Then
{
if Lowest(L,BarsSinceEntry) <= EntryPrice-수익1 and Lowest(l,BarsSinceEntry) > EntryPrice-수익2 Then
{
ExitShort("sl1",AtStop,EntryPrice+loss1);
ExitShort("str1",AtStop,Lowest(L,BarsSinceEntry)+TR1);
}
if Lowest(L,BarsSinceEntry) <= EntryPrice-수익2 Then
{
ExitShort("sl2",AtStop,EntryPrice+loss2);
ExitShort("str2",AtStop,lowest(l,BarsSinceEntry)+TR2);
}
}
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 아래 수식과 반대 수식을 요청 드립니다.
- 매도 진입 경우 exitshort 수식
****************************************************************************
input : 수익1(0.55),수익2(0.75);
input : loss1(0.2),loss2(0.3);
input : Tr1(0.2),Tr2(0.3);
if MarketPosition == 1 Then
{
if Highest(H,BarsSinceEntry) >= EntryPrice+수익1 and Highest(h,BarsSinceEntry) < EntryPrice+수익2 Then
{
ExitLong("bl1",AtStop,EntryPrice-loss1);
ExitLong("btr1",AtStop,Highest(h,BarsSinceEntry)-TR1);
}
if Highest(H,BarsSinceEntry) >= EntryPrice+수익2 Then
{
ExitLong("bl2",AtStop,EntryPrice-loss2);
ExitLong("btr2",AtStop,Highest(h,BarsSinceEntry)-TR2);
}
}