커뮤니티
wr240 시스템식 작성(30틱이내 재매수금지)
2019-09-17 12:44:34
220
글번호 132004
항상 감사드립니다
아래의 조건식을 작성하고 싶습니다
1. crossup(wr240,-20) 때 매수(신호발생봉부터 30틱이내 재매수금지)
crossdown(wr240,-80) 때 매도(신호발생봉부터 30틱이내 재매도금지)
2. t55 == 1 매수(신호발생봉부터 30틱이내 재매수금지)
t55 == -1 매도(신호발생봉부터 30틱이내 재매도금지)
############################
### Williams'R_포항(240) ###
############################
Input : Period82(240);
var : WR240(0),T55(0);
WR240 = WILLR(Period82);
if crossup(WR240,-20) Then
t55 = 1;
if crossdown(WR240,-80) Then
t55 = -1 ;
/********************************************************/
if MarketPosition == 1 Then
var1 = index;
if MarketPosition == -1 Then
var2 = index;
Condition1 = MarketPosition == 0 and MarketPosition(1) == 1 and BarsSinceExit(1) < 30; # 30틱이내 재진입금지 #
Condition2 = MarketPosition == 0 and MarketPosition(1) == -1 and BarsSinceExit(1) < 30;
/**************************************************************************************/
if c>선행스팬48 and t50==1 and t60==1 and c>var97 and c<상한선 and c>하한선 and
crossup(wr240,-20) then
{
if Condition1 == false Then
buy("B_WR240");
}
if c<선행스팬48 and t50==-1 and t60==-1 and c<var95 and c<상한선 and c>하한선 and
crossdown(wr240,-80) then
{
if Condition1 == false Then
sell("S_WR240");
}
감사합니다
답변 1
예스스탁 예스스탁 답변
2019-09-17 15:34:16
안녕하세요
예스스탁입니다.
1
Input : Period82(240);
var : WR240(0),T55(0);
WR240 = WILLR(Period82);
Condition1 = MarketPosition == 0 and MarketPosition(1) == 1 and BarsSinceExit(1) < 30; # 30틱이내 재진입금지 #
Condition2 = MarketPosition == 0 and MarketPosition(1) == -1 and BarsSinceExit(1) < 30;
if crossup(WR240,-20) Then
{
if Condition1 == false then
buy();
}
if crossdown(WR240,-80) Then
{
if Condition2 == false then
sell();
}
2
Input : Period82(240);
var : WR240(0),T55(0);
WR240 = WILLR(Period82);
Condition1 = MarketPosition == 0 and MarketPosition(1) == 1 and BarsSinceExit(1) < 30; # 30틱이내 재진입금지 #
Condition2 = MarketPosition == 0 and MarketPosition(1) == -1 and BarsSinceExit(1) < 30;
if crossup(WR240,-20) Then
t55 = 1;
if crossdown(WR240,-80) Then
t55 = -1 ;
if t55 == 1 and Condition1 == false then
buy();
if t55 == -1 and Condition2 == false then
sell();
즐거운 하루되세요
> 조민철 님이 쓴 글입니다.
> 제목 : wr240 시스템식 작성(30틱이내 재매수금지)
> 항상 감사드립니다
아래의 조건식을 작성하고 싶습니다
1. crossup(wr240,-20) 때 매수(신호발생봉부터 30틱이내 재매수금지)
crossdown(wr240,-80) 때 매도(신호발생봉부터 30틱이내 재매도금지)
2. t55 == 1 매수(신호발생봉부터 30틱이내 재매수금지)
t55 == -1 매도(신호발생봉부터 30틱이내 재매도금지)
############################
### Williams'R_포항(240) ###
############################
Input : Period82(240);
var : WR240(0),T55(0);
WR240 = WILLR(Period82);
if crossup(WR240,-20) Then
t55 = 1;
if crossdown(WR240,-80) Then
t55 = -1 ;
/********************************************************/
if MarketPosition == 1 Then
var1 = index;
if MarketPosition == -1 Then
var2 = index;
Condition1 = MarketPosition == 0 and MarketPosition(1) == 1 and BarsSinceExit(1) < 30; # 30틱이내 재진입금지 #
Condition2 = MarketPosition == 0 and MarketPosition(1) == -1 and BarsSinceExit(1) < 30;
/**************************************************************************************/
if c>선행스팬48 and t50==1 and t60==1 and c>var97 and c<상한선 and c>하한선 and
crossup(wr240,-20) then
{
if Condition1 == false Then
buy("B_WR240");
}
if c<선행스팬48 and t50==-1 and t60==-1 and c<var95 and c<상한선 and c>하한선 and
crossdown(wr240,-80) then
{
if Condition1 == false Then
sell("S_WR240");
}
감사합니다