커뮤니티
문의
2019-07-02 09:45:06
237
글번호 129941
옵션 거래에 사용하는 수식입니다.
진입가격대별로 손절,익절,tr을 지정하는 수식으로 수정 요청드립니다.
1) 2.01 이상 3.00 이하 진입했을 때 손절,익절,tr
2) 3.01 이상 4.00 이하 진입했을 때 손절,익절,tr
*********************************************************************
input : 최대(4.00), 최소(2.01);
input : 손절(60),익절(99999),TR(150);
var : ma1(0), ma2(0);
ma1 = ma(C,5);
ma2 = ma(C,20);
if 최대 >= C and C >= 최소 and CrossUp(ma1, ma2) then
buy();
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR);
}
답변 1
예스스탁 예스스탁 답변
2019-07-02 10:33:27
안녕하세요
예스스탁입니다.
input : 최대(4.00), 최소(2.01);
input : 손절1(60),익절1(99999),TR1(150);
input : 손절2(60),익절2(99999),TR2(150);
var : ma1(0), ma2(0);
ma1 = ma(C,5);
ma2 = ma(C,20);
if 최대 >= C and C >= 최소 and CrossUp(ma1, ma2) then
buy();
if MarketPosition == 1 then
{
if EntryPrice >= 2.01 and EntryPrice <= 3.00 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절1);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절1);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR1);
}
if EntryPrice >= 3.01 and EntryPrice <= 4.00 then
{
ExitLong("bl2",AtStop,EntryPrice-PriceScale*손절2);
ExitLong("bp2",Atlimit,EntryPrice+PriceScale*익절2);
ExitLong("btr2",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR2);
}
}
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 문의
> 옵션 거래에 사용하는 수식입니다.
진입가격대별로 손절,익절,tr을 지정하는 수식으로 수정 요청드립니다.
1) 2.01 이상 3.00 이하 진입했을 때 손절,익절,tr
2) 3.01 이상 4.00 이하 진입했을 때 손절,익절,tr
*********************************************************************
input : 최대(4.00), 최소(2.01);
input : 손절(60),익절(99999),TR(150);
var : ma1(0), ma2(0);
ma1 = ma(C,5);
ma2 = ma(C,20);
if 최대 >= C and C >= 최소 and CrossUp(ma1, ma2) then
buy();
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR);
}
다음글
이전글