커뮤니티

문의

프로필 이미지
목마와숙녀
2025-06-19 14:31:25
171
글번호 191921
답변완료
국내주간선물 5분봉 기준입니다. 아래수식은 수량 1개로 운영하는 수식입니다. 요청사항) 첫진입때 수량 2개를 진입시키고 1개씩 청산수식을 따로 적용하여 청산하고 싶습니다. 첫번째 청산수식(2개에서 1개) SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); 두번째 청산수식(나머지 1개) SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); 수식 완성 부탁드립니다. 항상 고맙습니다. ***************************************************************************** input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry==0 Then Buy("b"); SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop);
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2025-06-19 15:08:06

안녕하세요 예스스탁입니다. input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition <= 0 and data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry == 0 Then { Buy("b",OnClose,Def,2); ExitLong("bl1.",AtStop,C-1,"",1,1); ExitLong("bl2.",AtStop,C-2,"",1,1); } if MarketPosition == 1 Then { if lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitLong("bl1",AtStop,EntryPrice-1,"",1,1); if lowest(L,BarsSinceEntry) > EntryPrice-2 Then ExitLong("bl2",AtStop,EntryPrice-2,"",1,1); ExitLong("btr1",AtStop,highest(H,BarsSinceEntry)-1,"",1,1); ExitLong("btr2",AtStop,highest(H,BarsSinceEntry)-2,"",1,1); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 국내주간선물 5분봉 기준입니다. 아래수식은 수량 1개로 운영하는 수식입니다. 요청사항) 첫진입때 수량 2개를 진입시키고 1개씩 청산수식을 따로 적용하여 청산하고 싶습니다. 첫번째 청산수식(2개에서 1개) SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); 두번째 청산수식(나머지 1개) SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); 수식 완성 부탁드립니다. 항상 고맙습니다. ***************************************************************************** input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry==0 Then Buy("b"); SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop);
프로필 이미지

목마와숙녀

2025-06-19 15:45:42

답변 고맙습니다. 죄송하지만... 강제청산함수로 답변해주셨으면 합니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 > 안녕하세요 예스스탁입니다. input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition <= 0 and data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry == 0 Then { Buy("b",OnClose,Def,2); ExitLong("bl1.",AtStop,C-1,"",1,1); ExitLong("bl2.",AtStop,C-2,"",1,1); } if MarketPosition == 1 Then { if lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitLong("bl1",AtStop,EntryPrice-1,"",1,1); if lowest(L,BarsSinceEntry) > EntryPrice-2 Then ExitLong("bl2",AtStop,EntryPrice-2,"",1,1); ExitLong("btr1",AtStop,highest(H,BarsSinceEntry)-1,"",1,1); ExitLong("btr2",AtStop,highest(H,BarsSinceEntry)-2,"",1,1); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 국내주간선물 5분봉 기준입니다. 아래수식은 수량 1개로 운영하는 수식입니다. 요청사항) 첫진입때 수량 2개를 진입시키고 1개씩 청산수식을 따로 적용하여 청산하고 싶습니다. 첫번째 청산수식(2개에서 1개) SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); 두번째 청산수식(나머지 1개) SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); 수식 완성 부탁드립니다. 항상 고맙습니다. ***************************************************************************** input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry==0 Then Buy("b"); SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop);
프로필 이미지

예스스탁 예스스탁 답변

2025-06-19 16:35:26

안녕하세요 예스스탁입니다. 강제청산 함수로는 가능하지 않습니다. 강제청산 함수는 수량이 지정할 수 없어 분할로 청산하게 할 수 없습니다. 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : Re : Re : 문의 > 답변 고맙습니다. 죄송하지만... 강제청산함수로 답변해주셨으면 합니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 > 안녕하세요 예스스탁입니다. input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if MarketPosition <= 0 and data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry == 0 Then { Buy("b",OnClose,Def,2); ExitLong("bl1.",AtStop,C-1,"",1,1); ExitLong("bl2.",AtStop,C-2,"",1,1); } if MarketPosition == 1 Then { if lowest(L,BarsSinceEntry) > EntryPrice-1 Then ExitLong("bl1",AtStop,EntryPrice-1,"",1,1); if lowest(L,BarsSinceEntry) > EntryPrice-2 Then ExitLong("bl2",AtStop,EntryPrice-2,"",1,1); ExitLong("btr1",AtStop,highest(H,BarsSinceEntry)-1,"",1,1); ExitLong("btr2",AtStop,highest(H,BarsSinceEntry)-2,"",1,1); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 국내주간선물 5분봉 기준입니다. 아래수식은 수량 1개로 운영하는 수식입니다. 요청사항) 첫진입때 수량 2개를 진입시키고 1개씩 청산수식을 따로 적용하여 청산하고 싶습니다. 첫번째 청산수식(2개에서 1개) SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop); 두번째 청산수식(나머지 1개) SetStopLoss(2,PointStop); SetStopTrailing(3,0,PointStop); 수식 완성 부탁드립니다. 항상 고맙습니다. ***************************************************************************** input : upfs(575); var : T1(0),entry(0); if Bdate != Bdate[1] Then T1 = TotalTrades; if MarketPosition == 0 Then entry = TotalTrades-T1; Else entry = (TotalTrades-T1)+1; if data1(Bdate)==data2(Bdate) and Data2(c>Lowd(0)+upfs) and entry==0 Then Buy("b"); SetStopLoss(1,PointStop); SetStopTrailing(2,0,PointStop);