커뮤니티

문의

프로필 이미지
목마와숙녀
2022-03-02 12:33:23
1417
글번호 156863
답변완료
아래 수식을 동일한 차트에서 사용코자 합니다. 진입명(b1,b2,b3)에 따라 손절을 다르게 적용하고 싶습니다. 아래 수식을 수정하여 주시기 바랍니다. ********************************************************************************* if c >DayOpen+0.5 Then Buy("b1"); SetStopLoss(0.5,PercentStop); if data2(c >lowd(0)+50) Then Buy("b2"); SetStopLoss(0.3,PercentStop); if data3(c >Lowd(0)+100) Then Buy("b3"); SetStopLoss(0.2,PercentStop);
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2022-03-02 14:36:33

안녕하세요 예스스탁입니다. if c > DayOpen+0.5 Then Buy("b1"); if data2(c > lowd(0)+50) Then Buy("b2"); if data3(c > Lowd(0)+100) Then Buy("b3"); if MarketPosition == 1 Then { if LatestEntryName(0) == "b1" Then { Condition1 = true; var1 = LatestEntryPrice(0); } if LatestEntryName(0) == "b2" Then { Condition2 = true; var2 = LatestEntryPrice(0); } if LatestEntryName(0) == "b3" Then { Condition3 = true; var3 = LatestEntryPrice(0); } if Condition1 == true Then ExitLong("bx1",AtStop,var1*0.95,"b1"); if Condition2 == true Then ExitLong("bx2",AtStop,var1*0.97,"b2"); if Condition3 == true Then ExitLong("bx3",AtStop,var1*0.98,"b3"); } Else { Condition1 = False; Condition2 = False; Condition3 = False; } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식을 동일한 차트에서 사용코자 합니다. 진입명(b1,b2,b3)에 따라 손절을 다르게 적용하고 싶습니다. 아래 수식을 수정하여 주시기 바랍니다. ********************************************************************************* if c >DayOpen+0.5 Then Buy("b1"); SetStopLoss(0.5,PercentStop); if data2(c >lowd(0)+50) Then Buy("b2"); SetStopLoss(0.3,PercentStop); if data3(c >Lowd(0)+100) Then Buy("b3"); SetStopLoss(0.2,PercentStop);
프로필 이미지

목마와숙녀

2022-03-02 15:53:11

강제청산함수 (setstoploss)를 사용해서 부탁드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 > 안녕하세요 예스스탁입니다. if c > DayOpen+0.5 Then Buy("b1"); if data2(c > lowd(0)+50) Then Buy("b2"); if data3(c > Lowd(0)+100) Then Buy("b3"); if MarketPosition == 1 Then { if LatestEntryName(0) == "b1" Then { Condition1 = true; var1 = LatestEntryPrice(0); } if LatestEntryName(0) == "b2" Then { Condition2 = true; var2 = LatestEntryPrice(0); } if LatestEntryName(0) == "b3" Then { Condition3 = true; var3 = LatestEntryPrice(0); } if Condition1 == true Then ExitLong("bx1",AtStop,var1*0.95,"b1"); if Condition2 == true Then ExitLong("bx2",AtStop,var1*0.97,"b2"); if Condition3 == true Then ExitLong("bx3",AtStop,var1*0.98,"b3"); } Else { Condition1 = False; Condition2 = False; Condition3 = False; } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식을 동일한 차트에서 사용코자 합니다. 진입명(b1,b2,b3)에 따라 손절을 다르게 적용하고 싶습니다. 아래 수식을 수정하여 주시기 바랍니다. ********************************************************************************* if c >DayOpen+0.5 Then Buy("b1"); SetStopLoss(0.5,PercentStop); if data2(c >lowd(0)+50) Then Buy("b2"); SetStopLoss(0.3,PercentStop); if data3(c >Lowd(0)+100) Then Buy("b3"); SetStopLoss(0.2,PercentStop);
프로필 이미지

예스스탁 예스스탁 답변

2022-03-02 16:21:58

안녕하세요 예스스탁입니다. 해당 진입이 피라미딩이면 이전답변식으로 사용하셔야 합니다. if c > DayOpen+0.5 Then Buy("b1"); if data2(c > lowd(0)+50) Then Buy("b2"); if data3(c > Lowd(0)+100) Then Buy("b3"); if MarketPosition == 1 Then { if IsEntryName("b1") == true Then SetStopLoss(0.5,PercentStop); if IsEntryName("b2") == true Then SetStopLoss(0.3,PercentStop); if IsEntryName("b3") == true Then SetStopLoss(0.2,PercentStop); } Else { SetStopLoss(0); } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : Re : Re : 문의 > 강제청산함수 (setstoploss)를 사용해서 부탁드립니다. > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의 > 안녕하세요 예스스탁입니다. if c > DayOpen+0.5 Then Buy("b1"); if data2(c > lowd(0)+50) Then Buy("b2"); if data3(c > Lowd(0)+100) Then Buy("b3"); if MarketPosition == 1 Then { if LatestEntryName(0) == "b1" Then { Condition1 = true; var1 = LatestEntryPrice(0); } if LatestEntryName(0) == "b2" Then { Condition2 = true; var2 = LatestEntryPrice(0); } if LatestEntryName(0) == "b3" Then { Condition3 = true; var3 = LatestEntryPrice(0); } if Condition1 == true Then ExitLong("bx1",AtStop,var1*0.95,"b1"); if Condition2 == true Then ExitLong("bx2",AtStop,var1*0.97,"b2"); if Condition3 == true Then ExitLong("bx3",AtStop,var1*0.98,"b3"); } Else { Condition1 = False; Condition2 = False; Condition3 = False; } 즐거운 하루되세요 > 목마와숙녀 님이 쓴 글입니다. > 제목 : 문의 > 아래 수식을 동일한 차트에서 사용코자 합니다. 진입명(b1,b2,b3)에 따라 손절을 다르게 적용하고 싶습니다. 아래 수식을 수정하여 주시기 바랍니다. ********************************************************************************* if c >DayOpen+0.5 Then Buy("b1"); SetStopLoss(0.5,PercentStop); if data2(c >lowd(0)+50) Then Buy("b2"); SetStopLoss(0.3,PercentStop); if data3(c >Lowd(0)+100) Then Buy("b3"); SetStopLoss(0.2,PercentStop);