커뮤니티
수식오류
2018-11-17 23:01:45
208
글번호 123749
답변 수식으로 270 271 272 273을 세팅하여 시뮬레이션 한 결과
2018년 11월 16일에 272가 3번이나 진입합니다.(첨부파일 참조)
가격별로 max 1회만 거래하는 수식이라면
2018년 11월 16일은 273 1번, 272 1번 총 2회 거래합니다.
다시 한번 부탁드립니다.
*************************************************
Re : 거래횟수 제한
안녕하세요
예스스탁입니다.
input : Price1(266.50);
input : Price2(266.00);
input : Price3(265.50);
input : Price4(265.00);
var : T(0);
if T != 1 and NextBarOpen <= Price1 Then
buy("b1",AtStop,Price1);
if T != 2 and NextBarOpen <= Price2 Then
buy("b2",AtStop,Price2);
if T != 3 and NextBarOpen <= Price3 Then
buy("b3",AtStop,Price3);
if T != 4 and NextBarOpen <= Price4 Then
buy("b4",AtStop,Price4);
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b1" Then
T = 1 ;
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b2" Then
T = 2 ;
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b3" Then
T = 3 ;
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b4" Then
T = 4 ;
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 거래횟수 제한
> 가격별로 max 1회만 거래하는 수식을 요청합니다.
ex)가격이 265에서 정체하다가 265.50로 상승 시
아래 수식은
price4에서 여러번 진입과 청산을 반복하다 price3에서 진입합니다.
price4에서 1번만 거래하고 price3에서 진입하는 수식을 요청드립니다.
****************************************************************************
input : Price1(266.50);
input : Price2(266.00);
input : Price3(265.50);
input : Price4(265.00);
if NextBarOpen <= Price1 Then
buy("b1",AtStop,Price1);
if NextBarOpen <= Price2 Then
buy("b2",AtStop,Price2);
if NextBarOpen <= Price3 Then
buy("b3",AtStop,Price3);
if NextBarOpen <= Price4 Then
buy("b4",AtStop,Price4);
- 1. 오류파일.jpg (0.42 MB)
답변 1
예스스탁 예스스탁 답변
2018-11-22 10:39:29
안녕하세요? 예스스탁입니다.
문의하신 내용 답변드립니다.
input : Price1(266.50);
input : Price2(266.00);
input : Price3(265.50);
input : Price4(265.00);
var : T1(0), T2(0), T3(0), T4(0);
if date <> date[1] Then {
T1 = 0;
T2 = 0;
T3 = 0;
T4 = 0;
}
if T1 != 1 and NextBarOpen <= Price1 Then
buy("b1",AtStop,Price1);
if T2 != 1 and NextBarOpen <= Price2 Then
buy("b2",AtStop,Price2);
if T3 != 1 and NextBarOpen <= Price3 Then
buy("b3",AtStop,Price3);
if T4 != 1 and NextBarOpen <= Price4 Then
buy("b4",AtStop,Price4);
if IsEntryName("B1") Then
T1 = 1 ;
if IsEntryName("b2") Then
T2 = 1 ;
if IsEntryName("b3") Then
T3 = 1 ;
if IsEntryName("b4") Then
T4 = 1 ;
감사합니다.
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 수식오류
>
답변 수식으로 270 271 272 273을 세팅하여 시뮬레이션 한 결과
2018년 11월 16일에 272가 3번이나 진입합니다.(첨부파일 참조)
가격별로 max 1회만 거래하는 수식이라면
2018년 11월 16일은 273 1번, 272 1번 총 2회 거래합니다.
다시 한번 부탁드립니다.
*************************************************
Re : 거래횟수 제한
안녕하세요
예스스탁입니다.
input : Price1(266.50);
input : Price2(266.00);
input : Price3(265.50);
input : Price4(265.00);
var : T(0);
if T != 1 and NextBarOpen <= Price1 Then
buy("b1",AtStop,Price1);
if T != 2 and NextBarOpen <= Price2 Then
buy("b2",AtStop,Price2);
if T != 3 and NextBarOpen <= Price3 Then
buy("b3",AtStop,Price3);
if T != 4 and NextBarOpen <= Price4 Then
buy("b4",AtStop,Price4);
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b1" Then
T = 1 ;
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b2" Then
T = 2 ;
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b3" Then
T = 3 ;
if CurrentContracts > CurrentContracts and LatestEntryName(0) == "b4" Then
T = 4 ;
즐거운 하루되세요
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 거래횟수 제한
> 가격별로 max 1회만 거래하는 수식을 요청합니다.
ex)가격이 265에서 정체하다가 265.50로 상승 시
아래 수식은
price4에서 여러번 진입과 청산을 반복하다 price3에서 진입합니다.
price4에서 1번만 거래하고 price3에서 진입하는 수식을 요청드립니다.
****************************************************************************
input : Price1(266.50);
input : Price2(266.00);
input : Price3(265.50);
input : Price4(265.00);
if NextBarOpen <= Price1 Then
buy("b1",AtStop,Price1);
if NextBarOpen <= Price2 Then
buy("b2",AtStop,Price2);
if NextBarOpen <= Price3 Then
buy("b3",AtStop,Price3);
if NextBarOpen <= Price4 Then
buy("b4",AtStop,Price4);
다음글