커뮤니티

문의

프로필 이미지
목마와숙녀
2025-06-16 14:31:39
144
글번호 191764
답변완료
코스피 선물 5분봉 주간 데이트레이딩 기준입니다. 진입을 3번 하는 진입식이 있다고 할 때 거래 진입명칭은 b1,b2,b2 이렇게 나옵니다. b1 이름으로 첫번째 진입 b2 이름으로 두번째,세번째 진입합니다. 청산식은 진입명으로 매칭하여 아래식을 사용해왔습니다. 요청사항) 진입명이 아니고 진입순서에 따른 청산식을 아래처럼 적용하고 싶습니다. if MarketPosition== 1 Then { 첫번째 진입 경우 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); SetStopProfittarget(3,PointStop); } 두번째 진입 경우 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop); SetStopProfittarget(3.5,PointStop); } 세번째 진입 경우 Then { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); SetStopProfittarget(4,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } } 수식 완성 부탁드립니다. 항상 고맙습니다. ********************************************************************************** if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); SetStopProfittarget(3,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); SetStopProfittarget(4,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2025-06-16 15:47:33

안녕하세요 예스스탁입니다. var : tt(0),t1(0),entry(0); tt = TotalTrades; if Bdate != Bdate[1] Then t1 = tt[1]; entry = tt-t1+IFf(MarketPosition !=0,1,0); if MarketPosition== 1 Then { if entry == 1 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); SetStopProfittarget(3,PointStop); } else if entry == 2 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop); SetStopProfittarget(3.5,PointStop); } else if entry ==3 Then { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); SetStopProfittarget(4,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 코스피 선물 5분봉 주간 데이트레이딩 기준입니다. 진입을 3번 하는 진입식이 있다고 할 때 거래 진입명칭은 b1,b2,b2 이렇게 나옵니다. b1 이름으로 첫번째 진입 b2 이름으로 두번째,세번째 진입합니다. 청산식은 진입명으로 매칭하여 아래식을 사용해왔습니다. 요청사항) 진입명이 아니고 진입순서에 따른 청산식을 아래처럼 적용하고 싶습니다. if MarketPosition== 1 Then { 첫번째 진입 경우 Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); SetStopProfittarget(3,PointStop); } 두번째 진입 경우 Then { SetStopLoss(1.5,PointStop); SetStopTrailing(2.5,0,PointStop); SetStopProfittarget(3.5,PointStop); } 세번째 진입 경우 Then { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); SetStopProfittarget(4,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } } 수식 완성 부탁드립니다. 항상 고맙습니다. ********************************************************************************** if MarketPosition== 1 Then { if IsEntryName("b1") == true Then { SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); SetStopProfittarget(3,PointStop); } Else if IsEntryName("b2") == true Then { SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); SetStopProfittarget(4,PointStop); } Else { SetStopLoss(0); SetStopTrailing(0,0); SetStopProfittarget(0); } }