커뮤니티

수식 재문의

프로필 이미지
무명
2011-10-25 10:17:34
463
글번호 44070
답변완료
input: P1(5), P2(20),maxcont(10); vars: mafast(0), maslow(0), ncontr(0),XCommission(0),XSlippage(0); mafast = average(close, P1); maslow = average(close, P2); XCommission = c*(ExitCommission/100); #%설정 XSlippage = ExitSlippage; #Pt설정 if crossup(mafast,maslow) then { if MarketPosition == -1 then { exitshort(); if (PositionProfit-(XCommission+XSlippage)*CurrentContracts) > 0 then ncontr = ncontr+1; else ncontr = 1; } if MarketPosition != 1 then { Buy("B", onclose,def,iff(max(1,ncontr)<10,max(1,ncontr),10)); } } if CrossDown(mafast,maslow) then { if MarketPosition == 1 then { exitlong(); if (PositionProfit-(XCommission+XSlippage)*CurrentContracts) > 0 then ncontr = ncontr+1; else ncontr = 1; } if MarketPosition != -1 then { Sell("S", onclose,def,iff(max(1,ncontr)<10,max(1,ncontr),10)); } } 위의 내용은 역마틴게일 베팅전략을 수식으로 작성한 것인데요... 위의 수식을 마틴게일 방식으로 변환부탁드립니다. 내용은 아래 참조하시고요.. 감사합니다... 1계약으로 매매하다 1번 손실이 발생하면 2계약으로 진입,2번 연속 손실이 발생하면 3계약으로, 이런식으로 최고 3계약까지 베팅들어가고....수익이 발생하면 다음매매부터는 바로 1계약으로 매매합니다...수식 꼭 좀 부탁드려요...
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2011-10-25 11:28:44

안녕하세요 예스스탁입니다. input: P1(5), P2(20),maxcont(10); vars: mafast(0), maslow(0), ncontr(0),XCommission(0),XSlippage(0); mafast = average(close, P1); maslow = average(close, P2); XCommission = c*(ExitCommission/100); #%설정 XSlippage = ExitSlippage; #Pt설정 if crossup(mafast,maslow) then { if MarketPosition == -1 then { exitshort(); if (PositionProfit-(XCommission+XSlippage)*CurrentContracts) < 0 then ncontr = ncontr+1; else ncontr = 1; } if MarketPosition != 1 then { Buy("B", onclose,def,iff(max(1,ncontr)<10,max(1,ncontr),10)); } } if CrossDown(mafast,maslow) then { if MarketPosition == 1 then { exitlong(); if (PositionProfit-(XCommission+XSlippage)*CurrentContracts) < 0 then ncontr = ncontr+1; else ncontr = 1; } if MarketPosition != -1 then { Sell("S", onclose,def,iff(max(1,ncontr)<10,max(1,ncontr),10)); } } 즐거운 하루되세요 > 무명 님이 쓴 글입니다. > 제목 : 수식 재문의 > input: P1(5), P2(20),maxcont(10); vars: mafast(0), maslow(0), ncontr(0),XCommission(0),XSlippage(0); mafast = average(close, P1); maslow = average(close, P2); XCommission = c*(ExitCommission/100); #%설정 XSlippage = ExitSlippage; #Pt설정 if crossup(mafast,maslow) then { if MarketPosition == -1 then { exitshort(); if (PositionProfit-(XCommission+XSlippage)*CurrentContracts) > 0 then ncontr = ncontr+1; else ncontr = 1; } if MarketPosition != 1 then { Buy("B", onclose,def,iff(max(1,ncontr)<10,max(1,ncontr),10)); } } if CrossDown(mafast,maslow) then { if MarketPosition == 1 then { exitlong(); if (PositionProfit-(XCommission+XSlippage)*CurrentContracts) > 0 then ncontr = ncontr+1; else ncontr = 1; } if MarketPosition != -1 then { Sell("S", onclose,def,iff(max(1,ncontr)<10,max(1,ncontr),10)); } } 위의 내용은 역마틴게일 베팅전략을 수식으로 작성한 것인데요... 위의 수식을 마틴게일 방식으로 변환부탁드립니다. 내용은 아래 참조하시고요.. 감사합니다... 1계약으로 매매하다 1번 손실이 발생하면 2계약으로 진입,2번 연속 손실이 발생하면 3계약으로, 이런식으로 최고 3계약까지 베팅들어가고....수익이 발생하면 다음매매부터는 바로 1계약으로 매매합니다...수식 꼭 좀 부탁드려요...