답변완료
숫자 표현좀 부탁 드립니다.
* 항상 많은 도움에 고맙습니다
* 첨부사진 처럼 이전봉(C[1]) 숫자 표현 좀 부탁 드립니다.
PLOT1(3804) ;
PLOT2(3800) ;
PLOT3(3790) ;
* <수식요청>
아래 수식에서 "d3" 와 "s3" 에서 부터 진입 하도록 부탁 좀 드립니다.
즉 d1, d2 에서는 진입이 안되고 d3 부터 실매매 신호로 진입
s1, s2 에서는 진입이 안되고 s3 부터 실매매 신호로 진입
하도록 수식 좀 부탁 드립니다.
## 혹시 계산식이 어려우면 정수 비율로 해주십시요.
2, 4, 6 , 8 로
## <아래수식>
var1 = ma(c,5) ;
var2 = ma(c,20) ;
if MarketPosition == 0 and crossup(var1,var2) then buy("SS1",OnClose,DEF,1);
if MarketPosition == 0 and crossdown(var1,var2) then sell("DD1",OnClose,DEF,1);
if MarketPosition == -1 Then
{
if MaxEntries == 1 Then
Sell("d1",AtLimit,EntryPrice+2,2);
if MaxEntries == 2 Then
Sell("d2",AtLimit,AvgEntryPrice+4,4);
if MaxEntries == 3 Then
Sell("d3",AtLimit,AvgEntryPrice+4,4);
if MaxEntries >= 4 Then
Sell("d4",AtLimit,LatestEntryPrice(0)+5,1);
ExitShort("sx",AtLimit,AvgEntryPrice-5);
}
if MarketPosition == 1 Then
{
if MaxEntries == 1 Then
Buy("s1",AtLimit,EntryPrice-2,2);
if MaxEntries == 2 Then
Buy("s2",AtLimit,AvgEntryPrice-4,4);
if MaxEntries == 3 Then
Buy("s3",AtLimit,AvgEntryPrice-4,4);
if MaxEntries >= 3 Then
Buy("s4",AtLimit,LatestEntryPrice(0)-5,1);
ExitLong("bx",AtLimit,AvgEntryPrice+5);
}
* 고맙습니다 수고하십시요.
2021-01-13
953
글번호 145415
지표