커뮤니티

거래횟수 제한

프로필 이미지
목마와숙녀
2018-11-15 10:20:02
138
글번호 123690
답변완료
가격별로 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
프로필 이미지

예스스탁 예스스탁 답변

2018-11-15 14:58:31

안녕하세요 예스스탁입니다. 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);