예스스탁
예스스탁 답변
2021-01-13 12:50:35
안녕하세요
예스스탁입니다.
1
input : Price1(3804),Price2(3800),Price3(3790);
var : tx1(0),tx2(0),tx3(0),Tx4(0);
var : tl(0);
PLOT1(Price1) ;
PLOT2(Price2) ;
PLOT3(Price3) ;
Text_Delete(tx1);
Text_Delete(tx2);
Text_Delete(tx3);
Text_Delete(tx4);
tx1 = Text_New(NextBarSdate,NextBarStime,price1,NumToStr(Price1,2));
tx2 = Text_New(NextBarSdate,NextBarStime,Price2,NumToStr(price2,2));
tx3 = Text_New(NextBarSdate,NextBarStime,Price3,NumToStr(price3,2));
tx4 = Text_New(NextBarSdate,NextBarStime,C,NumToStr(C,2));
Text_SetStyle(tx1,0,1);
Text_SetStyle(tx2,0,1);
Text_SetStyle(tx3,0,1);
Text_SetStyle(tx4,0,1);
Text_SetColor(Tx1,MAGENTA);
Text_SetColor(Tx2,MAGENTA);
Text_SetColor(Tx3,MAGENTA);
Text_SetColor(Tx4,MAGENTA);
TL_Delete(TL);
TL = TL_New(sDate,sTime,C,NextBarSdate,NextBarStime,C);
TL_SetExtLeft(TL,true);
TL_SetExtRight(TL,true);
TL_SetColor(TL,MAGENTA);
2
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
{
#첫진입가
value1 = EntryPrice;
#두번째진입가
Value2 = EntryPrice+2;
#세번째진입가
Value3 = (value1*1+Value2*2)/3+4;
#네번째진입가
Value4 = (value1*1+Value2*2+Value3*4)/7+4;
#if MaxEntries == 1 Then
# Sell("d1",AtLimit,Value2,2);
#if MaxEntries == 2 Then
# Sell("d2",AtLimit,Value3,4);
if MaxEntries == 1 Then
Sell("d3",AtLimit,Value4+4,4);
if MaxEntries >= 2 Then
Sell("d4",AtLimit,LatestEntryPrice(0)+5,1);
ExitShort("sx",AtLimit,AvgEntryPrice-5);
}
if MarketPosition == 1 Then
{
#첫진입가
value1 = EntryPrice;
#두번째진입가
Value2 = EntryPrice-2;
#세번째진입가
Value3 = (value1*1+Value2*2)/3-4;
#네번째진입가
Value4 = (value1*1+Value2*2+Value3*4)/7-4;
#if MaxEntries == 1 Then
# Buy("s1",AtLimit,value2,2);
#if MaxEntries == 2 Then
# Buy("s2",AtLimit,Value3,4);
if MaxEntries == 3 Then
Buy("s3",AtLimit,value4,4);
if MaxEntries >= 3 Then
Buy("s4",AtLimit,LatestEntryPrice(0)-5,1);
ExitLong("bx",AtLimit,AvgEntryPrice+5);
}
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 숫자 표현좀 부탁 드립니다.
> * 항상 많은 도움에 고맙습니다
* 첨부사진 처럼 이전봉(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);
}
* 고맙습니다 수고하십시요.