커뮤니티

수식 수정바랍니다

프로필 이미지
중추신경
2021-05-26 12:29:03
1361
글번호 149331
답변완료
도움주신 수식잘 쓰고 있습니다. 여기서 질문이 있는데요... 장이 시작됐을때 신호를 초기화 해서 변곡이 나올때 신호가 나오게 var26(5선)을 세팅을 했는데요..) 1. var27(20선), var28(60선)도 같이 세팅을 하고 싶은데요.. condition 3,4,5,6을 추가해서 하면 되는건가요? 2. V1,V2, I1, I2를 이용해서 var28(60선)이 쌍바닥일때를 설정을했는데요. 쌍봉일때의 조건과, var26,var27에도 같은 쌍바닥, 쌍봉 조건을 넣고 싶습니다... 도움부탁드립니다. ------------------궁금한 수식------------------------ if Bdate != Bdate[1] Then { Condition1 = False; Condition2 = False; } if X == 1 and X != X[1] and Bdate == Bdate[1] Then Condition1 = true; if X == -1 and X != X[1] and Bdate == Bdate[1] Then Condition2 = true; if X60 == -1 Then { if X60 != X60[1] Then count = 0; if Z == 1 and Z != Z[1] Then { count = count+1; V1 = var28[1]; V2 = V1[1]; I1 = Index; i2 = I1[1]; } } Else { count = 0; } ----------------원래수식------------------- var : Period1(3),Period2(10),Period3(30),Period4(120),X5(0),X20(0),X60(0),XP(0),X(0),Y(0),Z(0),Q(0),Mav1(0), Mav2(0),Mav3(0),Mav4(0); Input : Left(3),right(3); var : B5(0),BP60(0),B20(0),B60(0),S5(0),S20(0),S60(0),SP60(0),Bcnt5(0),Bcnt20(0),Bcnt60(0),BcntP60(0), Scnt5(0), Scnt20(0), Scnt60(0),ScntP60(0),H1(0),H2(0),L1(0),L2(0); InPUT : 진입시작시간(090000), 매매종료시간(153000); var : count(0),V1(0),v2(0),i1(0),i2(0); if Bdate != Bdate[1] Then { Condition1 = False; Condition2 = False; } Var26 = ema(Ema(Ema(c,period1),period1),period1); //ma(c,period1); //5선 Var27 = ema(Ema(Ema(c,period2),period2),period2); //20선 Var28 = ema(Ema(Ema(c,period3),period3),period3); //60선 Var29 = ema(Ema(Ema(c,period4),period4),period4); //240선 if CrossUp(Var26,Var27) Then X5 = 1; //5-20 cross if CrossDown(Var26,Var27) Then X5 = -1; if CrossUp(Var27,Var28) Then X20 = 1; //20-60 cross if CrossDown(Var27,Var28) Then X20 = -1; if CrossUp(Var28,Var29) Then X60 = 1; //60-240 cross if CrossDown(Var28,Var29) Then X60 = -1; if CrossUp(Var26,Var28) Then XP = 1; //5-60 cross if CrossDown(Var26,Var28) Then XP = -1; if Var26 > var26[1] Then X = 1; if Var26 < var26[1] Then X = -1; if Var27 > var27[1] Then // X5 : 5-20 Cross X : 5선 Y = 1; // X20 : 20-60 Cross Y : 20선 if Var27 < var27[1] Then // X60 : 60-240 cross Z : 60선 Y = -1; // XP : 5-60 cross if Var28 > var28[1] Then Z = 1; if Var28 < var28[1] Then Z = -1; if X == 1 and X != X[1] and Bdate == Bdate[1] Then Condition1 = true; if X == -1 and X != X[1] and Bdate == Bdate[1] Then Condition2 = true; //////////////////////상방기준////////////////// if X60 == -1 Then { if X60 != X60[1] Then count = 0; if Z == 1 and Z != Z[1] Then { count = count+1; V1 = var28[1]; V2 = V1[1]; I1 = Index; i2 = I1[1]; } } Else { count = 0; } if XP == 1 and X == 1 and Condition1 == true Then //5-60 정배열 & 5상승 { if X != X[1] Then //5선이 상승변곡 이면 B = 1 { BP60 = 1; } //5선이 상승변곡 & 20선 상승 & 5선 20선위 & 몸통이 5 BC 면 B =2 if BP60 == 1 and Y == 1 and Var26 > Var27 and C > O and (C+O)/2 >= var26 Then { BP60 = 2; } } else BP60 = 0; //////////////////////하방기준////////////////// if XP == -1 and X == -1 and Condition2 == true Then { if X!= X[1] Then { SP60 = 1; } if SP60 == 1 and Y == -1 and Var26 < Var27 and C < O and (C+O)/2 < var26 Then { SP60 = 2; } } else SP60 = 0; //////////////////////////상방시그널///////////////// if sTime >= 진입시작시간 and sTime <= 매매종료시간 and XP == 1 Then { if XP != XP[1] Then BcntP60 = 0; if BP60 == 2 and BP60 != BP60[1] Then { BcntP60 = BcntP60+1; if BcntP60 <= 1 and (X60 == -1 and (count >= 3 or (count >= 2 and V1 >= V2-PriceScale*3 and i1 >= i2+30))) Then Buy("BP60"); } } ////////////////////////하방 시그널////////////////// if sTime >= 진입시작시간 and sTime <= 매매종료시간 and XP == -1 Then { if XP != XP[1] Then ScntP60 = 0; if SP60 == 2 and SP60 != SP60[1] Then { ScntP60 = ScntP60+1; if ScntP60 <= 1 Then Sell("SP60"); } } if MarketPosition == 1 Then { if X5 == 1 and CountIf(X5 == -1,BarsSinceEntry) == 0 and X == -1 and CountIf(X == -1 and X != X[1],BarsSinceEntry) >= 2 and (C+O)/2 <= Var27 then ExitLong("콜청1",AtMarket); if X5 == -1 and X == -1 and CountIf(X == -1 and X != X[1],BarsSinceEntry) >= 1 and (C+O)/2 <= Var27 Then ExitLong("콜정2",AtMarket); } if MarketPosition == -1 Then { if X5 == -1 and CountIf(X5 == 1,BarsSinceEntry) == 0 and X == 1 and CountIf(X == 1 and X != X[1],BarsSinceEntry) >= 2 and (C+O)/2 >= Var27 Then ExitShort("풋청1",AtMarket); if X5 == 1 and X == 1 and CountIf(X == 1 and X != X[1],BarsSinceEntry) >= 1 and (C+O)/2 >= Var27 Then ExitShort("풋정2",AtMarket); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2021-05-26 14:51:24

안녕하세요 예스스탁입니다. 1 변수명과 값할당은 수식안에서 임의로 지정해서 사용하는 부분입니다. 기존수식에 사용되지 않은 단어로 사용자분이 지정하신후 값저장해 사용하시면 됩니다. 2 문의하신 내용으로는 작성해해 보는데 시간이 많이 소모됩니다. 업무상 많은 시간이 요구되는 내용은 저희가 작성을 해드리기 어렵습니다. 도움을 드리지 못해 죄송합니다. 즐거운 하루되세요 > 중추신경 님이 쓴 글입니다. > 제목 : 수식 수정바랍니다 > 도움주신 수식잘 쓰고 있습니다. 여기서 질문이 있는데요... 장이 시작됐을때 신호를 초기화 해서 변곡이 나올때 신호가 나오게 var26(5선)을 세팅을 했는데요..) 1. var27(20선), var28(60선)도 같이 세팅을 하고 싶은데요.. condition 3,4,5,6을 추가해서 하면 되는건가요? 2. V1,V2, I1, I2를 이용해서 var28(60선)이 쌍바닥일때를 설정을했는데요. 쌍봉일때의 조건과, var26,var27에도 같은 쌍바닥, 쌍봉 조건을 넣고 싶습니다... 도움부탁드립니다. ------------------궁금한 수식------------------------ if Bdate != Bdate[1] Then { Condition1 = False; Condition2 = False; } if X == 1 and X != X[1] and Bdate == Bdate[1] Then Condition1 = true; if X == -1 and X != X[1] and Bdate == Bdate[1] Then Condition2 = true; if X60 == -1 Then { if X60 != X60[1] Then count = 0; if Z == 1 and Z != Z[1] Then { count = count+1; V1 = var28[1]; V2 = V1[1]; I1 = Index; i2 = I1[1]; } } Else { count = 0; } ----------------원래수식------------------- var : Period1(3),Period2(10),Period3(30),Period4(120),X5(0),X20(0),X60(0),XP(0),X(0),Y(0),Z(0),Q(0),Mav1(0), Mav2(0),Mav3(0),Mav4(0); Input : Left(3),right(3); var : B5(0),BP60(0),B20(0),B60(0),S5(0),S20(0),S60(0),SP60(0),Bcnt5(0),Bcnt20(0),Bcnt60(0),BcntP60(0), Scnt5(0), Scnt20(0), Scnt60(0),ScntP60(0),H1(0),H2(0),L1(0),L2(0); InPUT : 진입시작시간(090000), 매매종료시간(153000); var : count(0),V1(0),v2(0),i1(0),i2(0); if Bdate != Bdate[1] Then { Condition1 = False; Condition2 = False; } Var26 = ema(Ema(Ema(c,period1),period1),period1); //ma(c,period1); //5선 Var27 = ema(Ema(Ema(c,period2),period2),period2); //20선 Var28 = ema(Ema(Ema(c,period3),period3),period3); //60선 Var29 = ema(Ema(Ema(c,period4),period4),period4); //240선 if CrossUp(Var26,Var27) Then X5 = 1; //5-20 cross if CrossDown(Var26,Var27) Then X5 = -1; if CrossUp(Var27,Var28) Then X20 = 1; //20-60 cross if CrossDown(Var27,Var28) Then X20 = -1; if CrossUp(Var28,Var29) Then X60 = 1; //60-240 cross if CrossDown(Var28,Var29) Then X60 = -1; if CrossUp(Var26,Var28) Then XP = 1; //5-60 cross if CrossDown(Var26,Var28) Then XP = -1; if Var26 > var26[1] Then X = 1; if Var26 < var26[1] Then X = -1; if Var27 > var27[1] Then // X5 : 5-20 Cross X : 5선 Y = 1; // X20 : 20-60 Cross Y : 20선 if Var27 < var27[1] Then // X60 : 60-240 cross Z : 60선 Y = -1; // XP : 5-60 cross if Var28 > var28[1] Then Z = 1; if Var28 < var28[1] Then Z = -1; if X == 1 and X != X[1] and Bdate == Bdate[1] Then Condition1 = true; if X == -1 and X != X[1] and Bdate == Bdate[1] Then Condition2 = true; //////////////////////상방기준////////////////// if X60 == -1 Then { if X60 != X60[1] Then count = 0; if Z == 1 and Z != Z[1] Then { count = count+1; V1 = var28[1]; V2 = V1[1]; I1 = Index; i2 = I1[1]; } } Else { count = 0; } if XP == 1 and X == 1 and Condition1 == true Then //5-60 정배열 & 5상승 { if X != X[1] Then //5선이 상승변곡 이면 B = 1 { BP60 = 1; } //5선이 상승변곡 & 20선 상승 & 5선 20선위 & 몸통이 5 BC 면 B =2 if BP60 == 1 and Y == 1 and Var26 > Var27 and C > O and (C+O)/2 >= var26 Then { BP60 = 2; } } else BP60 = 0; //////////////////////하방기준////////////////// if XP == -1 and X == -1 and Condition2 == true Then { if X!= X[1] Then { SP60 = 1; } if SP60 == 1 and Y == -1 and Var26 < Var27 and C < O and (C+O)/2 < var26 Then { SP60 = 2; } } else SP60 = 0; //////////////////////////상방시그널///////////////// if sTime >= 진입시작시간 and sTime <= 매매종료시간 and XP == 1 Then { if XP != XP[1] Then BcntP60 = 0; if BP60 == 2 and BP60 != BP60[1] Then { BcntP60 = BcntP60+1; if BcntP60 <= 1 and (X60 == -1 and (count >= 3 or (count >= 2 and V1 >= V2-PriceScale*3 and i1 >= i2+30))) Then Buy("BP60"); } } ////////////////////////하방 시그널////////////////// if sTime >= 진입시작시간 and sTime <= 매매종료시간 and XP == -1 Then { if XP != XP[1] Then ScntP60 = 0; if SP60 == 2 and SP60 != SP60[1] Then { ScntP60 = ScntP60+1; if ScntP60 <= 1 Then Sell("SP60"); } } if MarketPosition == 1 Then { if X5 == 1 and CountIf(X5 == -1,BarsSinceEntry) == 0 and X == -1 and CountIf(X == -1 and X != X[1],BarsSinceEntry) >= 2 and (C+O)/2 <= Var27 then ExitLong("콜청1",AtMarket); if X5 == -1 and X == -1 and CountIf(X == -1 and X != X[1],BarsSinceEntry) >= 1 and (C+O)/2 <= Var27 Then ExitLong("콜정2",AtMarket); } if MarketPosition == -1 Then { if X5 == -1 and CountIf(X5 == 1,BarsSinceEntry) == 0 and X == 1 and CountIf(X == 1 and X != X[1],BarsSinceEntry) >= 2 and (C+O)/2 >= Var27 Then ExitShort("풋청1",AtMarket); if X5 == 1 and X == 1 and CountIf(X == 1 and X != X[1],BarsSinceEntry) >= 1 and (C+O)/2 >= Var27 Then ExitShort("풋정2",AtMarket); }