커뮤니티

진입가격별 청산수식

프로필 이미지
목마와숙녀
2024-08-01 10:42:21
658
글번호 179680
답변완료
진입가격에 따른 청산수식 작성해보았습니다. 바른지요? #포지션 있을 때 if MarketPosition != 0 Then { if Entryprice >= dayopen and Entryprice < dayopen+1.25 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop,1); } Else if Entryprice >= dayopen+1.25 and Entryprice < dayopen+2.5 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop,1); } Else { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop,1); } } Else #무포지션이면 해제 { SetStopLoss(0); SetStopTrailing(0,0); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2024-05-20 13:56:03

안녕하세요 예스스탁입니다. 1 작성하신 수식이 아래 내용이면 맞습니다. 진입가가 시초가이상 시초가+1.25 미만이면 1포인트 손절, 최고수익지점대비 2포인트 되돌림이면 청산 진입가가 시초가+1.25이상 시초가+2.5 미만이면 1.5포인트 손절, 최고수익지점대비 2.5포인트 되돌림이면 청산 그 외(진입가가 시초가+2.5 이상이거나 시초가 아래) 2포인트 손절, 최고수익지점대비 3포인트 되돌림이면 청산 무포지션이면 해제 2 다만 만약 매수와 매도가 시초가 기준이 반대이시면 아래와 같이 작성하셔야 합니다. #포지션 있을 때 if MarketPosition == 1 Then { if Entryprice >= dayopen and Entryprice < dayopen+1.25 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop,1); } Else if Entryprice >= dayopen+1.25 and Entryprice < dayopen+2.5 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop,1); } Else { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop,1); } } else if MarketPosition == -1 Then { if Entryprice <= dayopen and Entryprice > dayopen-1.25 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop,1); } Else if Entryprice <= dayopen-1.25 and Entryprice > dayopen-2.5 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop,1); } Else { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop,1); } } Else #무포지션이면 해제 { SetStopLoss(0); SetStopTrailing(0,0); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 진입가격에 따른 청산수식 작성해보았습니다. 바른지요? #포지션 있을 때 if MarketPosition != 0 Then { if Entryprice >= dayopen and Entryprice < dayopen+1.25 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop,1); } Else if Entryprice >= dayopen+1.25 and Entryprice < dayopen+2.5 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop,1); } Else { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop,1); } } Else #무포지션이면 해제 { SetStopLoss(0); SetStopTrailing(0,0); }