커뮤니티

안녕하세요

프로필 이미지
브라질리안
2014-01-02 13:00:33
157
글번호 70973
답변완료
아래와 같은 수식을 사용하고 있습니다 맨 아래쪽에 보면 매도식이 있습니다 정상정으로 매도 진행은 되는거 같은데 제 의도는 매도식에서 다른 조건값들 전에 당일 최초매수후 나머지 수식이 맞을때 매도 진입을 하고 싶습니다 당일 최초매수 이후 다음과 같은 수식이 맞을때 매도 하고 싶습니다 if MarketPosition == 0 and (IsExitName("매수청산3",1) == true or IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("매수청산1",4) == true) and C < MAv9 and close < open and c > dayopen+p3 and RSIV < RSIvalue3 Then sell("매도"); input : StartTime(90200); input : RSVValue(60); input : Vol(1280); input : 간격(0.8); input : LossPoint(0.65),청산음봉갯수(3),ProfitPoint(10); input : LossPoint2(0.5); input : ProfitPoint2(10); input : LossPoint4(0.5); input : ProfitPoint4(10); input : z(1.35); input : N(1.75); input : y(1); input : x(0.5); input : q(2); input : w(2); input : p(3); input : p3(1); var : cnt(0),count(0),rebuy(0),ReEL(0); var : cond1(false),cond2(false); input : RSIP(9),RSIvalue1(30),RSIvalue2(50),RSIvalue3(50); var : RSIV(0); RSIV = RSI(RSIP); //ma1 input : maPeriod1(7); var : MAv1(0); MAv1 = ma(C,maPeriod1); //ma2 input : maPeriod2(22); var : MAv2(0); MAv2 = ma(C,maPeriod2); //ma3 input : maPeriod3(29); var : MAv3(0); MAv3 = ma(C,maPeriod3); //ma4 input : maPeriod4(60); var : MAv4(0); MAv4 = ma(C,maPeriod4); //ma5 Input : maPeriod5(56); var : MAv5(0); MAv5 = ma(C,maPeriod5); //ma6 Input : maPeriod6(2); var : MAv6(0); MAv6 = ma(C,maPeriod6); //ma7 Input : maPeriod7(50); var : MAv7(0); MAv7 = ma(C,maPeriod7); //ma8 Input : maPeriod8(50); var : MAv8(0); MAv8 = ma(C,maPeriod8); //ma9 Input : maPeriod9(50); var : MAv9(0); MAv9 = ma(C,maPeriod9); //ma10 Input : maPeriod10(50); var : MAv10(0); MAv10 = ma(C,maPeriod10); //RSI input : rsiPeriod(3); var : RSV(0); RSV = RSI(rsiPeriod); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if date != date[1] Then{ Rebuy = 0; ReEL = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] and IsEntryName("최초매수") == true Then{ Rebuy = 0; ReEL = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] and IsEntryName("재매수") == true Then Rebuy = Rebuy+1; if BarsSinceExit(1) == 1 and MarketPosition != MarketPosition[1] and IsExitName("매수청산4",1) == true Then ReEL = ReEL+1; cond1 = C > O or (C==O and C >= C[1]); cond2 = C < O or (C==O and C < C[1]); if stime >= StartTime and MarketPosition <= 0 and (count == 0 or (count > 0 and IsExitName("매수청산4",1) == false) or (count > 0 and countif(C < mav5,BarsSinceExit(1)) >= 1)) and C <= DayLow+N and V > Vol && close > open && MAv1 > MAv2 && MAv2 > MAv3 && MAv3 > MAv4 && RSV > RSVValue && MAv2 - MAv4 <= 간격 && C < dayopen+z && C > MAv7 Then { Buy("최초매수", OnClose, DEF); } if MarketPosition == 1 and IsEntryName("최초매수") Then{ ExitLong("매수청산2",AtStop,EntryPrice-Losspoint); ExitLong("매수청산3",AtLimit,EntryPrice+Profitpoint); } if MarketPosition == 1 and IsEntryName("최초매수") and C < MAv5 and c > dayopen+p Then Exitlong("매수청산1"); if MarketPosition == 1 and C < dayopen+p then{ if RSIV < RSIvalue1 or (BarsSinceEntry >= 청산음봉갯수 and Countif(cond2 == true,청산음봉갯수) == 청산음봉갯수) Then ExitLong("매수청산4"); } if MarketPosition == 0 and (IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("청산15",1) == true) and count > 0 and RSIV > RSIvalue2 and C > MAv6 and C > MAv5 and close > open and countif(C < mav5,BarsSinceExit(1)) < 1 and C <= DayLow+q and C < dayopen+w then buy("재매수"); if MarketPosition == 1 and C < dayopen+p and highest(h,BarsSinceEntry) >= EntryPrice+Y Then ExitLong("청산7",AtStop,highest(H,BarsSinceEntry)-x); if MarketPosition == 0 and (IsExitName("매수청산3",1) == true or IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("매수청산1",4) == true) and C < MAv9 and close < open and c > dayopen+p3 and RSIV < RSIvalue3 Then sell("매도"); if MarketPosition == -1 and IsEntryName("매도") Then{ ExitShort("매도청산2",AtStop,EntryPrice+Losspoint2); ExitShort("매도청산3",AtLimit,EntryPrice-Profitpoint2); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2014-01-02 20:03:26

안녕하세요 예스스탁입니다. input : StartTime(90200); input : RSVValue(60); input : Vol(1280); input : 간격(0.8); input : LossPoint(0.65),청산음봉갯수(3),ProfitPoint(10); input : LossPoint2(0.5); input : ProfitPoint2(10); input : LossPoint4(0.5); input : ProfitPoint4(10); input : z(1.35); input : N(1.75); input : y(1); input : x(0.5); input : q(2); input : w(2); input : p(3); input : p3(1); var : cnt(0),count(0),rebuy(0),ReEL(0); var : cond1(false),cond2(false); input : RSIP(9),RSIvalue1(30),RSIvalue2(50),RSIvalue3(50); var : RSIV(0),Bcond(false); RSIV = RSI(RSIP); if date != date[1] Then Bcond = false; if MarketPosition == 1 and IsEntryName("최초매수") == true Then Bcond = true; //ma1 input : maPeriod1(7); var : MAv1(0); MAv1 = ma(C,maPeriod1); //ma2 input : maPeriod2(22); var : MAv2(0); MAv2 = ma(C,maPeriod2); //ma3 input : maPeriod3(29); var : MAv3(0); MAv3 = ma(C,maPeriod3); //ma4 input : maPeriod4(60); var : MAv4(0); MAv4 = ma(C,maPeriod4); //ma5 Input : maPeriod5(56); var : MAv5(0); MAv5 = ma(C,maPeriod5); //ma6 Input : maPeriod6(2); var : MAv6(0); MAv6 = ma(C,maPeriod6); //ma7 Input : maPeriod7(50); var : MAv7(0); MAv7 = ma(C,maPeriod7); //ma8 Input : maPeriod8(50); var : MAv8(0); MAv8 = ma(C,maPeriod8); //ma9 Input : maPeriod9(50); var : MAv9(0); MAv9 = ma(C,maPeriod9); //ma10 Input : maPeriod10(50); var : MAv10(0); MAv10 = ma(C,maPeriod10); //RSI input : rsiPeriod(3); var : RSV(0); RSV = RSI(rsiPeriod); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if date != date[1] Then{ Rebuy = 0; ReEL = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] and IsEntryName("최초매수") == true Then{ Rebuy = 0; ReEL = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] and IsEntryName("재매수") == true Then Rebuy = Rebuy+1; if BarsSinceExit(1) == 1 and MarketPosition != MarketPosition[1] and IsExitName("매수청산4",1) == true Then ReEL = ReEL+1; cond1 = C > O or (C==O and C >= C[1]); cond2 = C < O or (C==O and C < C[1]); if stime >= StartTime and MarketPosition <= 0 and (count == 0 or (count > 0 and IsExitName("매수청산4",1) == false) or (count > 0 and countif(C < mav5,BarsSinceExit(1)) >= 1)) and C <= DayLow+N and V > Vol && close > open && MAv1 > MAv2 && MAv2 > MAv3 && MAv3 > MAv4 && RSV > RSVValue && MAv2 - MAv4 <= 간격 && C < dayopen+z && C > MAv7 Then { Buy("최초매수", OnClose, DEF); } if MarketPosition == 1 and IsEntryName("최초매수") Then{ ExitLong("매수청산2",AtStop,EntryPrice-Losspoint); ExitLong("매수청산3",AtLimit,EntryPrice+Profitpoint); } if MarketPosition == 1 and IsEntryName("최초매수") and C < MAv5 and c > dayopen+p Then Exitlong("매수청산1"); if MarketPosition == 1 and C < dayopen+p then{ if RSIV < RSIvalue1 or (BarsSinceEntry >= 청산음봉갯수 and Countif(cond2 == true,청산음봉갯수) == 청산음봉갯수) Then ExitLong("매수청산4"); } if MarketPosition == 0 and (IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("청산15",1) == true) and count > 0 and RSIV > RSIvalue2 and C > MAv6 and C > MAv5 and close > open and countif(C < mav5,BarsSinceExit(1)) < 1 and C <= DayLow+q and C < dayopen+w then buy("재매수"); if MarketPosition == 1 and C < dayopen+p and highest(h,BarsSinceEntry) >= EntryPrice+Y Then ExitLong("청산7",AtStop,highest(H,BarsSinceEntry)-x); if Bcond == true and MarketPosition == 0 and (IsExitName("매수청산3",1) == true or IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("매수청산1",4) == true) and C < MAv9 and close < open and c > dayopen+p3 and RSIV < RSIvalue3 Then sell("매도"); if MarketPosition == -1 and IsEntryName("매도") Then{ ExitShort("매도청산2",AtStop,EntryPrice+Losspoint2); ExitShort("매도청산3",AtLimit,EntryPrice-Profitpoint2); } 즐거운 하루되세요 > 브라질리안 님이 쓴 글입니다. > 제목 : 안녕하세요 > 아래와 같은 수식을 사용하고 있습니다 맨 아래쪽에 보면 매도식이 있습니다 정상정으로 매도 진행은 되는거 같은데 제 의도는 매도식에서 다른 조건값들 전에 당일 최초매수후 나머지 수식이 맞을때 매도 진입을 하고 싶습니다 당일 최초매수 이후 다음과 같은 수식이 맞을때 매도 하고 싶습니다 if MarketPosition == 0 and (IsExitName("매수청산3",1) == true or IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("매수청산1",4) == true) and C < MAv9 and close < open and c > dayopen+p3 and RSIV < RSIvalue3 Then sell("매도"); input : StartTime(90200); input : RSVValue(60); input : Vol(1280); input : 간격(0.8); input : LossPoint(0.65),청산음봉갯수(3),ProfitPoint(10); input : LossPoint2(0.5); input : ProfitPoint2(10); input : LossPoint4(0.5); input : ProfitPoint4(10); input : z(1.35); input : N(1.75); input : y(1); input : x(0.5); input : q(2); input : w(2); input : p(3); input : p3(1); var : cnt(0),count(0),rebuy(0),ReEL(0); var : cond1(false),cond2(false); input : RSIP(9),RSIvalue1(30),RSIvalue2(50),RSIvalue3(50); var : RSIV(0); RSIV = RSI(RSIP); //ma1 input : maPeriod1(7); var : MAv1(0); MAv1 = ma(C,maPeriod1); //ma2 input : maPeriod2(22); var : MAv2(0); MAv2 = ma(C,maPeriod2); //ma3 input : maPeriod3(29); var : MAv3(0); MAv3 = ma(C,maPeriod3); //ma4 input : maPeriod4(60); var : MAv4(0); MAv4 = ma(C,maPeriod4); //ma5 Input : maPeriod5(56); var : MAv5(0); MAv5 = ma(C,maPeriod5); //ma6 Input : maPeriod6(2); var : MAv6(0); MAv6 = ma(C,maPeriod6); //ma7 Input : maPeriod7(50); var : MAv7(0); MAv7 = ma(C,maPeriod7); //ma8 Input : maPeriod8(50); var : MAv8(0); MAv8 = ma(C,maPeriod8); //ma9 Input : maPeriod9(50); var : MAv9(0); MAv9 = ma(C,maPeriod9); //ma10 Input : maPeriod10(50); var : MAv10(0); MAv10 = ma(C,maPeriod10); //RSI input : rsiPeriod(3); var : RSV(0); RSV = RSI(rsiPeriod); count = 0; for cnt = 0 to 20{ if sdate == EntryDate(cnt) Then count = count+1; } if date != date[1] Then{ Rebuy = 0; ReEL = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] and IsEntryName("최초매수") == true Then{ Rebuy = 0; ReEL = 0; } if MarketPosition == 1 and MarketPosition != MarketPosition[1] and IsEntryName("재매수") == true Then Rebuy = Rebuy+1; if BarsSinceExit(1) == 1 and MarketPosition != MarketPosition[1] and IsExitName("매수청산4",1) == true Then ReEL = ReEL+1; cond1 = C > O or (C==O and C >= C[1]); cond2 = C < O or (C==O and C < C[1]); if stime >= StartTime and MarketPosition <= 0 and (count == 0 or (count > 0 and IsExitName("매수청산4",1) == false) or (count > 0 and countif(C < mav5,BarsSinceExit(1)) >= 1)) and C <= DayLow+N and V > Vol && close > open && MAv1 > MAv2 && MAv2 > MAv3 && MAv3 > MAv4 && RSV > RSVValue && MAv2 - MAv4 <= 간격 && C < dayopen+z && C > MAv7 Then { Buy("최초매수", OnClose, DEF); } if MarketPosition == 1 and IsEntryName("최초매수") Then{ ExitLong("매수청산2",AtStop,EntryPrice-Losspoint); ExitLong("매수청산3",AtLimit,EntryPrice+Profitpoint); } if MarketPosition == 1 and IsEntryName("최초매수") and C < MAv5 and c > dayopen+p Then Exitlong("매수청산1"); if MarketPosition == 1 and C < dayopen+p then{ if RSIV < RSIvalue1 or (BarsSinceEntry >= 청산음봉갯수 and Countif(cond2 == true,청산음봉갯수) == 청산음봉갯수) Then ExitLong("매수청산4"); } if MarketPosition == 0 and (IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("청산15",1) == true) and count > 0 and RSIV > RSIvalue2 and C > MAv6 and C > MAv5 and close > open and countif(C < mav5,BarsSinceExit(1)) < 1 and C <= DayLow+q and C < dayopen+w then buy("재매수"); if MarketPosition == 1 and C < dayopen+p and highest(h,BarsSinceEntry) >= EntryPrice+Y Then ExitLong("청산7",AtStop,highest(H,BarsSinceEntry)-x); if MarketPosition == 0 and (IsExitName("매수청산3",1) == true or IsExitName("매수청산4",1) == true or IsExitName("청산7",1) == true or IsExitName("매수청산1",4) == true) and C < MAv9 and close < open and c > dayopen+p3 and RSIV < RSIvalue3 Then sell("매도"); if MarketPosition == -1 and IsEntryName("매도") Then{ ExitShort("매도청산2",AtStop,EntryPrice+Losspoint2); ExitShort("매도청산3",AtLimit,EntryPrice-Profitpoint2); }