커뮤니티

메시지로그------------

프로필 이미지
leekss1
2011-04-05 18:06:25
688
글번호 37288
답변완료
Input : Period(0),maP(0),N(0),Tr1(0),Tr2(0),진입(0),ADXP(0); Var : value(0); var2 = adx(adxP); value = ma(bids,period)-ma(asks,period); if stime >= 093000 and stime < 144500 and var2 >=10 then { if value > value[1]+진입 and ma(C,map) >= ma(C,map)[1]+N Then buy(); if value < value[1]-진입 and ma(C,map) <= ma(C,map)[1]-N Then Sell(); SetStopLoss(PriceScale*20,PointStop); #SetStopProfittarget(PriceScale*5,PointStop); if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+3 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-tr1); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-tr2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-3 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+tr1); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+tr2); } } //시간청산 var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만기날 } else { SetStopEndofday(150100); //평일 } 위식에서 var2 와 value 값을 메시지로고로 볼수있게 해주세요 (사용법 간략설명 부탁합니다)
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-04-06 09:14:39

안녕하세요 예스스탁입니다. 식을 적용하시면 디버깅창에 값이 표시됩니다. 메세지로그에 대한 자세한 사항은 아래링크를 참고하시기 바랍니다. https://www.yesstock.com/YesTrader/YesLanguage/YesLanguage_help/4_2.htm Input : Period(0),maP(0),N(0),Tr1(0),Tr2(0),진입(0),ADXP(0); Var : value(0); var2 = adx(adxP); value = ma(bids,period)-ma(asks,period); if stime >= 093000 and stime < 144500 and var2 >=10 then { if value > value[1]+진입 and ma(C,map) >= ma(C,map)[1]+N Then buy(); if value < value[1]-진입 and ma(C,map) <= ma(C,map)[1]-N Then Sell(); SetStopLoss(PriceScale*20,PointStop); #SetStopProfittarget(PriceScale*5,PointStop); if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+3 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-tr1); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-tr2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-3 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+tr1); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+tr2); } } //시간청산 var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만기날 } else { SetStopEndofday(150100); //평일 } MessageLog("%.2f %.2f",var2,value); 즐거운 하루되세요 > leekss1 님이 쓴 글입니다. > 제목 : 메시지로그------------ > Input : Period(0),maP(0),N(0),Tr1(0),Tr2(0),진입(0),ADXP(0); Var : value(0); var2 = adx(adxP); value = ma(bids,period)-ma(asks,period); if stime >= 093000 and stime < 144500 and var2 >=10 then { if value > value[1]+진입 and ma(C,map) >= ma(C,map)[1]+N Then buy(); if value < value[1]-진입 and ma(C,map) <= ma(C,map)[1]-N Then Sell(); SetStopLoss(PriceScale*20,PointStop); #SetStopProfittarget(PriceScale*5,PointStop); if MarketPosition == 1 Then{ if Highest(H,BarsSinceEntry) < EntryPrice+3 Then ExitLong("bx1",AtStop,Highest(H,BarsSinceEntry)-tr1); Else ExitLong("bx2",AtStop,Highest(H,BarsSinceEntry)-tr2); } if MarketPosition == -1 Then{ if Lowest(L,BarsSinceEntry) > EntryPrice-3 Then ExitShort("sx1",AtStop,Lowest(L,BarsSinceEntry)+tr1); Else ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+tr2); } } //시간청산 var11 = int(date/100)-int(date/10000)*100; //월 var22 = date - int(date/100)*100; //일 var33 = DayOfWeek(date); //요일 if var11%3 == 0 and var22 >= 8 and var22 <= 14 and var33 == 4 then { SetStopEndofday(144800); //만기날 } else { SetStopEndofday(150100); //평일 } 위식에서 var2 와 value 값을 메시지로고로 볼수있게 해주세요 (사용법 간략설명 부탁합니다)