커뮤니티

문의드립니다...

프로필 이미지
머니사이언스
2013-11-30 22:46:41
248
글번호 69993
답변완료
아래식을 검증하는데 오류가 떠서 작동이 안됩니다... 선언되지 않은 EntriesToday가 사용되어서 그렇다는데...잘 모르겠습니다 --------------------------------------------- Input: ProfitPt(5), TrailBar(30), entryCount(1), P1(40), P2(160), P3(110); Vars: Pivot(0), Support1(0), Support2(0), Support3(0), Resistance1(0), Resistance2(0), Resistance3(0), BearMarket(false) , BullMarket(false); // Calculation of Pivot, support and resistance points Pivot = ( dayLow(1) + dayHIgh(1) + dayClose(1) ) / 3; Resistance1 = ( Pivot * 2 ) - dayLow(1); Resistance2 = Pivot + (dayhigh(1)-dayLow(1)); Resistance3 = Resistance1 + (dayhigh(1)-dayLow(1)); Support1 = ( Pivot * 2 ) - dayHIgh(1); Support2 = Pivot - (dayhigh(1)-dayLow(1)); Support3 = Support1 - (dayhigh(1)-dayLow(1)); // Determination of market character BullMarket = ma( Close , P1 ) > ma( Close , P2 ) AND ma( Close , P2 ) > ma( Close , P3 ); BearMarket = ma( Close , P1 ) < ma( Close , P2 ) AND ma( Close , P2 ) < ma( Close , P3 ); // Placement of long orders if EntriesToday(date) < entryCount then begin If BullMarket then Begin Buy ("Bull R2", atstop,Resistance2 ) ; Buy ("Bull R3", atstop, Resistance3) ; end; // Placement of short orders If bearmarket then begin Sell ("Bear S2", atstop, Support2) ; Sell ("Bear S3", atstop, Support3) ; end; end; // Exit at first Profitable Open If MarketPosition == 1 and NextBarOpen > EntryPrice + ProfitPt then ExitLong ("Long Profit", AtMarket); If MarketPosition == -1 and NextBarOpen < EntryPrice - ProfitPt then ExitShort ("Short Profit", AtMarket) ; // Exit with trailing stops ExitLong("EL", atstop,Lowest( Low , TrailBar )) ; ExitShort("ES", atstop, Highest( High , TrailBar )) ; SetStopEndofday(150000);
시스템
답변 3
프로필 이미지

예스스탁 예스스탁 답변

2013-12-02 13:49:40

안녕하세요 예스스탁입니다. 작성하신 식의 경우 사용자함수가 필요합니다. 아래 내용을 사용자함수로 만드신 후에 시스템식 사용하시면 됩니다. 사용자함수 함수명 Entriestoday 반환값형 : 숫자형 input : ndate(Numeric); var : count(0); count = 0; for value1 = 0 to 10{ if EntryDate(value1) == ndate Then count = count+1; } Entriestoday = count; 즐거운 하루되세요 > 머니사이언스 님이 쓴 글입니다. > 제목 : 문의드립니다... > 아래식을 검증하는데 오류가 떠서 작동이 안됩니다... 선언되지 않은 EntriesToday가 사용되어서 그렇다는데...잘 모르겠습니다 --------------------------------------------- Input: ProfitPt(5), TrailBar(30), entryCount(1), P1(40), P2(160), P3(110); Vars: Pivot(0), Support1(0), Support2(0), Support3(0), Resistance1(0), Resistance2(0), Resistance3(0), BearMarket(false) , BullMarket(false); // Calculation of Pivot, support and resistance points Pivot = ( dayLow(1) + dayHIgh(1) + dayClose(1) ) / 3; Resistance1 = ( Pivot * 2 ) - dayLow(1); Resistance2 = Pivot + (dayhigh(1)-dayLow(1)); Resistance3 = Resistance1 + (dayhigh(1)-dayLow(1)); Support1 = ( Pivot * 2 ) - dayHIgh(1); Support2 = Pivot - (dayhigh(1)-dayLow(1)); Support3 = Support1 - (dayhigh(1)-dayLow(1)); // Determination of market character BullMarket = ma( Close , P1 ) > ma( Close , P2 ) AND ma( Close , P2 ) > ma( Close , P3 ); BearMarket = ma( Close , P1 ) < ma( Close , P2 ) AND ma( Close , P2 ) < ma( Close , P3 ); // Placement of long orders if EntriesToday(date) < entryCount then begin If BullMarket then Begin Buy ("Bull R2", atstop,Resistance2 ) ; Buy ("Bull R3", atstop, Resistance3) ; end; // Placement of short orders If bearmarket then begin Sell ("Bear S2", atstop, Support2) ; Sell ("Bear S3", atstop, Support3) ; end; end; // Exit at first Profitable Open If MarketPosition == 1 and NextBarOpen > EntryPrice + ProfitPt then ExitLong ("Long Profit", AtMarket); If MarketPosition == -1 and NextBarOpen < EntryPrice - ProfitPt then ExitShort ("Short Profit", AtMarket) ; // Exit with trailing stops ExitLong("EL", atstop,Lowest( Low , TrailBar )) ; ExitShort("ES", atstop, Highest( High , TrailBar )) ; SetStopEndofday(150000);
프로필 이미지

머니사이언스

2013-12-04 08:03:42

그러면 예스스탁님이 써주신 내용을 덧붙여 사용하면 되는 건가요? 제가 잘 몰라서요...부탁드립니다... ================================== > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다... > 안녕하세요 예스스탁입니다. 작성하신 식의 경우 사용자함수가 필요합니다. 아래 내용을 사용자함수로 만드신 후에 시스템식 사용하시면 됩니다. 사용자함수 함수명 Entriestoday 반환값형 : 숫자형 input : ndate(Numeric); var : count(0); count = 0; for value1 = 0 to 10{ if EntryDate(value1) == ndate Then count = count+1; } Entriestoday = count; 즐거운 하루되세요 > 머니사이언스 님이 쓴 글입니다. > 제목 : 문의드립니다... > 아래식을 검증하는데 오류가 떠서 작동이 안됩니다... 선언되지 않은 EntriesToday가 사용되어서 그렇다는데...잘 모르겠습니다 --------------------------------------------- Input: ProfitPt(5), TrailBar(30), entryCount(1), P1(40), P2(160), P3(110); Vars: Pivot(0), Support1(0), Support2(0), Support3(0), Resistance1(0), Resistance2(0), Resistance3(0), BearMarket(false) , BullMarket(false); // Calculation of Pivot, support and resistance points Pivot = ( dayLow(1) + dayHIgh(1) + dayClose(1) ) / 3; Resistance1 = ( Pivot * 2 ) - dayLow(1); Resistance2 = Pivot + (dayhigh(1)-dayLow(1)); Resistance3 = Resistance1 + (dayhigh(1)-dayLow(1)); Support1 = ( Pivot * 2 ) - dayHIgh(1); Support2 = Pivot - (dayhigh(1)-dayLow(1)); Support3 = Support1 - (dayhigh(1)-dayLow(1)); // Determination of market character BullMarket = ma( Close , P1 ) > ma( Close , P2 ) AND ma( Close , P2 ) > ma( Close , P3 ); BearMarket = ma( Close , P1 ) < ma( Close , P2 ) AND ma( Close , P2 ) < ma( Close , P3 ); // Placement of long orders if EntriesToday(date) < entryCount then begin If BullMarket then Begin Buy ("Bull R2", atstop,Resistance2 ) ; Buy ("Bull R3", atstop, Resistance3) ; end; // Placement of short orders If bearmarket then begin Sell ("Bear S2", atstop, Support2) ; Sell ("Bear S3", atstop, Support3) ; end; end; // Exit at first Profitable Open If MarketPosition == 1 and NextBarOpen > EntryPrice + ProfitPt then ExitLong ("Long Profit", AtMarket); If MarketPosition == -1 and NextBarOpen < EntryPrice - ProfitPt then ExitShort ("Short Profit", AtMarket) ; // Exit with trailing stops ExitLong("EL", atstop,Lowest( Low , TrailBar )) ; ExitShort("ES", atstop, Highest( High , TrailBar )) ; SetStopEndofday(150000);
프로필 이미지

예스스탁 예스스탁 답변

2013-12-06 15:43:18

안녕하세요 예스스탁입니다. Input: ProfitPt(5), TrailBar(30), entryCount(1), P1(40), P2(160), P3(110); Vars: Pivot(0), Support1(0), Support2(0), Support3(0), Resistance1(0), Resistance2(0), Resistance3(0), BearMarket(false) , BullMarket(false),cnt(0),EntriesToday(0); // Calculation of Pivot, support and resistance points Pivot = ( dayLow(1) + dayHIgh(1) + dayClose(1) ) / 3; Resistance1 = ( Pivot * 2 ) - dayLow(1); Resistance2 = Pivot + (dayhigh(1)-dayLow(1)); Resistance3 = Resistance1 + (dayhigh(1)-dayLow(1)); Support1 = ( Pivot * 2 ) - dayHIgh(1); Support2 = Pivot - (dayhigh(1)-dayLow(1)); Support3 = Support1 - (dayhigh(1)-dayLow(1)); // Determination of market character BullMarket = ma( Close , P1 ) > ma( Close , P2 ) AND ma( Close , P2 ) > ma( Close , P3 ); BearMarket = ma( Close , P1 ) < ma( Close , P2 ) AND ma( Close , P2 ) < ma( Close , P3 ); EntriesToday = 0; for cnt = 0 to 30{ if sdate == EntryDate(cnt) Then EntriesToday = EntriesToday+1; } // Placement of long orders if EntriesToday < entryCount then begin If BullMarket then Begin Buy ("Bull R2", atstop,Resistance2 ) ; Buy ("Bull R3", atstop, Resistance3) ; end; // Placement of short orders If bearmarket then begin Sell ("Bear S2", atstop, Support2) ; Sell ("Bear S3", atstop, Support3) ; end; end; // Exit at first Profitable Open If MarketPosition == 1 and NextBarOpen > EntryPrice + ProfitPt then ExitLong ("Long Profit", AtMarket); If MarketPosition == -1 and NextBarOpen < EntryPrice - ProfitPt then ExitShort ("Short Profit", AtMarket) ; // Exit with trailing stops ExitLong("EL", atstop,Lowest( Low , TrailBar )) ; ExitShort("ES", atstop, Highest( High , TrailBar )) ; SetStopEndofday(150000); 즐거운 하루되세요 > 머니사이언스 님이 쓴 글입니다. > 제목 : Re : Re : 문의드립니다... > 그러면 예스스탁님이 써주신 내용을 덧붙여 사용하면 되는 건가요? 제가 잘 몰라서요...부탁드립니다... ================================== > 예스스탁 님이 쓴 글입니다. > 제목 : Re : 문의드립니다... > 안녕하세요 예스스탁입니다. 작성하신 식의 경우 사용자함수가 필요합니다. 아래 내용을 사용자함수로 만드신 후에 시스템식 사용하시면 됩니다. 사용자함수 함수명 Entriestoday 반환값형 : 숫자형 input : ndate(Numeric); var : count(0); count = 0; for value1 = 0 to 10{ if EntryDate(value1) == ndate Then count = count+1; } Entriestoday = count; 즐거운 하루되세요 > 머니사이언스 님이 쓴 글입니다. > 제목 : 문의드립니다... > 아래식을 검증하는데 오류가 떠서 작동이 안됩니다... 선언되지 않은 EntriesToday가 사용되어서 그렇다는데...잘 모르겠습니다 --------------------------------------------- Input: ProfitPt(5), TrailBar(30), entryCount(1), P1(40), P2(160), P3(110); Vars: Pivot(0), Support1(0), Support2(0), Support3(0), Resistance1(0), Resistance2(0), Resistance3(0), BearMarket(false) , BullMarket(false); // Calculation of Pivot, support and resistance points Pivot = ( dayLow(1) + dayHIgh(1) + dayClose(1) ) / 3; Resistance1 = ( Pivot * 2 ) - dayLow(1); Resistance2 = Pivot + (dayhigh(1)-dayLow(1)); Resistance3 = Resistance1 + (dayhigh(1)-dayLow(1)); Support1 = ( Pivot * 2 ) - dayHIgh(1); Support2 = Pivot - (dayhigh(1)-dayLow(1)); Support3 = Support1 - (dayhigh(1)-dayLow(1)); // Determination of market character BullMarket = ma( Close , P1 ) > ma( Close , P2 ) AND ma( Close , P2 ) > ma( Close , P3 ); BearMarket = ma( Close , P1 ) < ma( Close , P2 ) AND ma( Close , P2 ) < ma( Close , P3 ); // Placement of long orders if EntriesToday(date) < entryCount then begin If BullMarket then Begin Buy ("Bull R2", atstop,Resistance2 ) ; Buy ("Bull R3", atstop, Resistance3) ; end; // Placement of short orders If bearmarket then begin Sell ("Bear S2", atstop, Support2) ; Sell ("Bear S3", atstop, Support3) ; end; end; // Exit at first Profitable Open If MarketPosition == 1 and NextBarOpen > EntryPrice + ProfitPt then ExitLong ("Long Profit", AtMarket); If MarketPosition == -1 and NextBarOpen < EntryPrice - ProfitPt then ExitShort ("Short Profit", AtMarket) ; // Exit with trailing stops ExitLong("EL", atstop,Lowest( Low , TrailBar )) ; ExitShort("ES", atstop, Highest( High , TrailBar )) ; SetStopEndofday(150000);