Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
joe105598055 committed Jul 10, 2022
1 parent 597cdce commit f09ccb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
File renamed without changes.
34 changes: 16 additions & 18 deletions README.md → SCRIPT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,38 +34,36 @@ Begin
End;
```

### 多 will
### 多 will (2022/07/10)
```
input: title("will多","策略名稱");
input: rvalue(10,"R 值區間");
value1 = high[1] - close[1];
value2 = high[1] - close[2];
value3 = high[2] - close[1];
value4 = high[2] - close[2];
value5 = K_Value(9,3);
value6 = D_Value(9,3);
value1 = MaxList(high[1],high[2]);
value2 = MinList(low[1],low[2]);
value3 = value1 - value2;
value4 = K_Value(9,3);
value5 = D_Value(9,3);
if(close > high[1] and close > high[2] and value1 < rvalue and value2 < rvalue and value3 < rvalue and value4 < rvalue and value5 > value6) Then
if(Getfield("Close","tick") > value1 and value3 <= rvalue and value4 > value5) Then
Begin
Print(File("C:\Users\sherr\Desktop\XQ\xq.log"),"多單觸發",title,NumToStr(DateTime,0),symbol,NumToStr(Getfield("Close"),0));
Print(File("C:\Users\sherr\Desktop\XQ\xq.log"),"多單觸發",title,NumToStr(DateTime,0),symbol,NumToStr(Getfield("Close","tick"),0));
RetVal = 1;
End;
```

### 空 will
### 空 will (2022/07/10)
```
input: title("will空","策略名稱");
input: rvalue(10,"R 值區間");
value1 = high[1] - close[1];
value2 = high[1] - close[2];
value3 = high[2] - close[1];
value4 = high[2] - close[2];
value5 = K_Value(9,3);
value6 = D_Value(9,3);
value1 = MaxList(high[1],high[2]);
value2 = MinList(low[1],low[2]);
value3 = value1 - value2;
value4 = K_Value(9,3);
value5 = D_Value(9,3);
if(close < low[1] and close < low[2] and value1 < rvalue and value2 < rvalue and value3 < rvalue and value4 < rvalue and value5 < value6) Then
if(Getfield("Close","tick") < value2 and value3 <= rvalue and value4 < value5) Then
Begin
Print(File("C:\Users\sherr\Desktop\XQ\xq.log"),"空單觸發",title,NumToStr(DateTime,0),symbol,NumToStr(Getfield("Close"),0));
Print(File("C:\Users\sherr\Desktop\XQ\xq.log"),"空單觸發",title,NumToStr(DateTime,0),symbol,NumToStr(Getfield("Close","tick"),0));
RetVal = 1;
End;
```

0 comments on commit f09ccb2

Please sign in to comment.