답변완료
문의
아래 수식을 동일한 차트에서 사용코자 합니다.
진입명(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
1416
글번호 156863
시스템
답변완료
수식추가 부탁드립니다.
안녕하세요?
아래의 수식에 역진입을 추가하고 싶습니다.
*역진입조건 : 진입후 바로 다음봉이 반대봉나오면 청산후 역진입.
역진입후, 포지션의 반대방향의 봉이면 또 실행 5회(외부변수) 실시.
부탁드립니다
감사합니다.
input : 익절틱수(50),손절틱수(50),진입횟수(3);
input : 작은이평(5),큰이평(20);
var : entry(0);
var1 = ma(c,작은이평);
var2 = ma(C,큰이평);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if VAR1 > Var2 and MarketPosition == 0 and
entry < 진입횟수 and
C[1] < O[1] and abs(O[1]-C[2]) > 0 and
C < O and abs(O-C[1]) > 0 Then
Sell();
if VAR1 < Var2 and MarketPosition == 0 and
entry < 진입횟수 and
C[1] > O[1] and abs(O[1]-C[2]) > 0 and
C > O and abs(O-C[1]) > 0 Then
Buy();
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2022-03-02
1025
글번호 156849
시스템