커뮤니티
예스랭귀지 Q&A
답변완료
[공지] 예스랭귀지 AI 어시스턴트, '예스나 AI' 출시 및 무료 체험 안내
안녕하세요, 예스스탁 입니다.복잡한 수식 공부 없이 여러분의 아이디어를 말하면 시스템 트레이딩 언어 예스랭귀지로 작성해주는 서비스예스나 AI(YesNa AI)가 출시되었습니다.지금 예스나 AI를 직접 경험해 보실 수 있도록 20크레딧(질문권 20회)를 무료로 증정해 드리고 있습니다.바로 여러분의 아이디어를 코드로 변환해보세요.--------------------------------------------------🚀 YesNa AI 핵심 기능- 지표식/전략식/종목검색식 생성: 자연어로 요청하면 예스랭귀지 문법에 맞는 코드를 작성합니다.- 종목검색식 변환 지원: K증권의 종목 검색식을 예스랭귀지로 변환 지원합니다.- 컴파일 검증: 작성된 코드가 실행 가능한지 컴파일러를 통해 문법 검증을 거쳐 결과물을 제공합니다.상세한 서비스 개요 및 활용 방법은 [서비스 소개 페이지]에서 확인하실 수 있습니다.▶ 서비스 소개 페이지: 바로가기서비스 사용 유의사항 및 결제 환불정책은 [이용약관]을 참고 부탁드립니다.▶ 서비스 이용약관: 바로가기💬 이용 문의사용 중 문의사항은 [프로그램 사용법 Q&A] 게시판에서 [예스나 AI] 카테고리를 설정 후 문의해 주시면 상세히 안내해 드리겠습니다.--------------------------------------------------앞으로도 AI를 활용한 다양한 트레이딩 기능들을 지속적으로 선보일 예정입니다.많은 관심과 기대 부탁드립니다.
2026-02-27
8160
글번호 230811
답변완료
피브나치요청
* 항상 많은 도움에 고맙습니다.
* 100일 피보선 그리고저 하는데 이게 아닌가요?
input : Per1(25.0),Per2(38.0),Per3(50.0),Per4(63.0),Per5(75);
var : HH(0),LL(0);
var1; ma(c,100) ;
HH = max(var1);
LL = min(var1);
var1 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per1/100));
var2 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per2/100));
var3 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per3/100));
var4 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per4/100));
var5 = 10^(LOG10(HH)-(LOG10(HH)-LOG10(LL))*(Per5/100));
* 고맙 습니다.
2017-08-16
264
글번호 112057
오토 님에 의해서 삭제되었습니다.
2017-08-16
6
글번호 112056
답변완료
ts 코드 예스 변환 관련
다음과 같은 ts 이지코드를 예스에 붙여넣으면 에러가 엄청 많이 발생하네요...
도와주세요
Variables:
m_typeEvalBase( 0.0 ),
m_dbEvalProfitLoss( 0.0 ),
m_nBarNumberBid( 0.0 ),
m_nBarNumberAsk( 0.0 ),
IntrabarPersist m_bValidEnvironment( false ),
IntrabarPersist m_dbTickUnit( 0.0 ),
m_dbTickPrice( 0.0 ),
IntrabarPersist m_bSetExitRateAlwaysLong( false ),
IntrabarPersist m_bSetExitRateAlwaysShort( false ),
m_bExitPartLongHappend( false ),
m_bExitPartShortHappend( false ),
IntrabarPersist m_nTotalOpen( 1 ),
IntrabarPersist m_nOpenVolume( 1 ),
IntrabarPersist m_nTradeVolume( 1 ),
IntrabarPersist m_nOpenAmount( 0 ),
IntrabarPersist m_nTotalVolumes( 0 ),
IntrabarPersist m_nTotalAmount( 0 ),
IntrabarPersist m_bOrderSignaled( False ),
tmpCount( 0 ),
tmpAgo( 0 ),
StochasticFast_Range( 14 ),
StochasticFast_FastK( 3 ),
StochasticFast_FastD( 3 ),
outFastK( 0 ),
outFastD( 0 ),
outSlowK( 0 ),
outSlowD( 0 ),
stcst_fast( 0 );
Arrays:
m_aryOpenVolume[1](0),
m_aryExitVolume[1](0),
m_aryOpenPrice[1](0),
m_aryExitPrice[1](0);
{ ===================================== Get Volume from Direct Amount ===========================}
Method double GetValidVolumeByDirectAmount(int amount)
Var:
double RetVolume;
Begin
if amount > Close Then
RetVolume = amount / Close
Else
RetVolume = 0;
Return RetVolume;
End;
{ ===============================================================================================}
{ ===================================== Get Volume from rate of Amount ==========================}
Method double GetValidVolumeByRateAmount(int amount, double rate)
Var:
double RetVolume;
Begin
if (amount * rate) > Close Then
RetVolume = (amount * rate) / Close
Else
RetVolume = 0;
Return RetVolume;
End;
{ ===============================================================================================}
{ ===================================== Get Direct Volume =======================================}
Method double GetValidVolumeByDirectVolume(int vol)
Var:
double RetVolume;
Begin
RetVolume = vol;
Return RetVolume;
End;
{ ===============================================================================================}
{ ====================================== Get Volume from rate of Volume =========================}
Method double GetValidVolumeByRateVolume(int vol, double rate)
Var:
double RetVolume;
Begin
RetVolume = vol * rate * 0.01;
Return RetVolume;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ============================================}
{ --------------------------------------Open--------------------------------------------------}
Method void BuyEval_ThisClose(int open_count, int vol, double price)
Begin
Buy ("[E]매수진입(TC)") vol Shares this bar on Close;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Open------------------------------------------------}
Method void BuyReal_ThisClose(int open_count, int vol, double price)
Begin
Buy ("[R]매수진입(TC)") vol Shares this bar on Close;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void BuyOrder_ThisClose(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
BuyReal_ThisClose(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
BuyEval_ThisClose(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade =============================================}
{ --------------------------------------Open---------------------------------------------------}
Method void BuyEval_NextOpen(int open_count, int vol, double price)
Begin
Buy ("[E]매수진입(NO)") vol Shares next bar at Open;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Open--------------------------------------------------}
Method void BuyReal_NextOpen(int open_count, int vol, double price)
Begin
Buy ("[R]매수진입(NO)") vol Shares next bar at Open;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void BuyOrder_NextOpen(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
BuyReal_NextOpen(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
BuyEval_NextOpen(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ============================================}
{ --------------------------------------Open--------------------------------------------------}
Method void BuyEval_NextMarket(int open_count, int vol, double price)
Begin
Buy ("[E]매수진입(NM)") vol Shares next bar at Market;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Open------------------------------------------------}
Method void BuyReal_NextMarket(int open_count, int vol, double price)
Begin
Buy ("[R]매수진입(NM)") vol Shares next bar at Market;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void BuyOrder_NextMarket(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then
Begin
If reverse = false Then Begin
BuyReal_NextMarket(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
BuyEval_NextMarket(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ==============================================}
{ --------------------------------------Open----------------------------------------------------}
Method void BuyEval_NextStop(int open_count, int vol, double price)
Begin
Buy ("[E]매수진입(NS)") vol Shares next bar at price Stop;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Open---------------------------------------------------}
Method void BuyReal_NextStop(int open_count, int vol, double price)
Begin
Buy ("[R]매수진입(NS)") vol Shares next bar at price Stop;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void BuyOrder_NextStop(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
BuyReal_NextStop(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
BuyEval_NextStop(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade =============================================}
{ --------------------------------------Open---------------------------------------------------}
Method void BuyEval_NextLimit(int open_count, int vol, double price)
Begin
Buy ("[E]매수진입(NL)") vol Shares next bar at price Limit;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Open--------------------------------------------------}
Method void BuyReal_NextLimit(int open_count, int vol, double price)
Begin
Buy ("[R]매수진입(NL)") vol Shares next bar at price Limit;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = CurrentBar;
m_aryOpenPrice[open_count] = close;
m_aryOpenVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Buy Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void BuyOrder_NextLimit(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
BuyReal_NextLimit(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
BuyEval_NextLimit(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ============================================}
{ --------------------------------------Exit--------------------------------------------------}
Method void SellEval_ThisClose(int open_count, int vol, double price)
Begin
Sell ("[E]매수청산(TC)") vol Shares Total this bar on Close;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Exit----------------------------------------------------}
Method void SellReal_ThisClose(int open_count, int vol, double price)
Begin
Sell ("[R]매수청산(TC)") vol Shares Total this bar on Close;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void SellOrder_ThisClose(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
SellReal_ThisClose(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
SellEval_ThisClose(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ==============================================}
{ --------------------------------------Exit----------------------------------------------------}
Method void SellEval_NextOpen(int open_count, int vol, double price)
Begin
Sell ("[E]매수청산(NO)") vol Shares Total next bar at Open;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Exit----------------------------------------------------}
Method void SellReal_NextOpen(int open_count, int vol, double price)
Begin
Sell ("[R]매수청산(NO)") vol Shares Total next bar at Open;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void SellOrder_NextOpen(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
SellReal_NextOpen(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
SellEval_NextOpen(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ==============================================}
{ --------------------------------------Exit----------------------------------------------------}
Method void SellEval_NextMarket(int open_count, int vol, double price)
Begin
Sell ("[E]매수청산(NM)") vol Shares Total next bar at Market;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Exit---------------------------------------------------}
Method void SellReal_NextMarket(int open_count, int vol, double price)
Begin
Sell ("[R]매수청산(NM)") vol Shares Total next bar at Market;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void SellOrder_NextMarket(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
SellReal_NextMarket(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
SellEval_NextMarket(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ==============================================}
{ --------------------------------------Exit----------------------------------------------------}
Method void SellEval_NextStop(int open_count, int vol, double price)
Begin
Sell ("[E매수청산(NS)") vol Shares Total next bar at price Stop;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Exit----------------------------------------------------}
Method void SellReal_NextStop(int open_count, int vol, double price)
Begin
Sell ("[R]매수청산(NS)") vol Shares Total next bar at price Stop;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void SellOrder_NextStop(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
SellReal_NextStop(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
SellEval_NextStop(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
{ ==================================== Long Trade ==============================================}
{ --------------------------------------Exit----------------------------------------------------}
Method void SellEval_NextLimit(int open_count, int vol, double price)
Begin
Sell ("[E]매수청산(NL)") vol Shares Total next bar at price Stop;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ --------------------------------------Exit----------------------------------------------------}
Method void SellReal_NextLimit(int open_count, int vol, double price)
Begin
Sell ("[R]매수청산(NL)") vol Shares Total next bar at price Limit;
If open_count <= CurrentEntries Then Begin
m_nBarNumberBid = 0;
m_nBarNumberAsk = 0;
m_aryExitPrice[open_count] = close;
m_aryExitVolume[open_count] = vol;
MessageLog("[", BarDateTime.ToString(), "] Sell Vol : ", vol, ", CurrentContracts : ", CurrentContracts);
End;
End;
{ ===============================================================================================}
Method void SellOrder_NextLimit(int open_count, int vol, double price, bool reverse)
Begin
If IsTodayBar(BarDateTime.ELDate) = true and IsOperatingTime() = true Then Begin
If reverse = false Then Begin
SellReal_NextLimit(open_count, vol, price);
End;
End
Else Begin
If reverse = false Then Begin
SellEval_NextLimit(open_count, vol, price);
End;
End;
End;
{ ===============================================================================================}
Method double GetEvalTotalProfitLoss(int eval_type)
Var:
double eval_rate;
Begin
If MarketPosition = 1 Then Begin
switch (eval_type)
Begin
case 0:
eval_rate = (Close * CurrentShares) - (AvgEntryPrice * CurrentShares);
break;
case 1:
eval_rate = (Close - AvgEntryPrice) / AvgEntryPrice * 100.0;
break;
case 2:
eval_rate = (Close - AvgEntryPrice) / m_dbTickUnit;
break;
case 3:
eval_rate = Close - AvgEntryPrice;
break;
End;
End;
Return eval_rate;
End;
{ ===============================================================================================}
Method double GetEvalEntryProfitLoss(int eval_type, int ago_num)
Var:
double eval_rate;
Begin
eval_rate = 0.0;
If MarketPosition = 1 AND CurrentEntries > ago_num Then Begin
value1 = m_aryOpenPrice[CurrentEntries - 1 - ago_num];
If value1 <> 0 Then Begin
switch (eval_type)
Begin
case 0:
eval_rate = Close - value1;
break;
case 1:
eval_rate = (Close - value1) / value1 * 100.0;
break;
case 2:
eval_rate = (Close - value1) / m_dbTickUnit;
break;
case 3:
eval_rate = Close - value1;
break;
End;
End;
End;
Return eval_rate;
End;
{ ===============================================================================================}
Method bool IsOperatingTime()
Var:
bool ret_val;
Begin
ret_val = true;
Return ret_val;
End;
{ ===============================================================================================}
Method bool IsTodayBar(int bar_date)
Var:
bool ret_val;
Begin
ret_val = bar_date = CurrentDate;
Return ret_val;
End;
{ ===============================================================================================}
{ ====================================== Open Price Method ======= =========================}
Method double GetOpenPrice(int ago_num)
Var:
double RetPrice;
Begin
RetPrice = 0.0;
If CurrentEntries > ago_num Then Begin
RetPrice = m_aryOpenPrice[CurrentEntries - 1 - ago_num];
End;
Return RetPrice;
End;
{ ===============================================================================================}
{ ====================================== Exit Price Method =================================}
Method double GetExitPrice(int ago_num)
Var:
double RetPrice;
Begin
RetPrice = 0.0;
If CurrentEntries > ago_num Then Begin
RetPrice = m_aryExitPrice[CurrentEntries - 1 - ago_num];
End;
Return RetPrice;
End;
{ ===============================================================================================}
Method int GetEqualTopCount(int ago, int bar_range)
Var:
int RetCount;
Begin
RetCount = 0;
tmpCount = bar_range;
tmpAgo = ago;
Value1 = HighestFC(High[tmpAgo], tmpCount + 1);
For Value2 = 0 To tmpCount - 1 Begin
If Close[Value2 + tmpAgo] = Value1 Then
RetCount = RetCount + 1;
End;
Return RetCount;
End;
{ ===============================================================================================}
Method int GetEqualBottomCount(int ago, int bar_range)
Var:
int RetCount;
Begin
RetCount = 0;
tmpCount = bar_range;
tmpAgo = ago;
Value1 = LowestFC(Low[tmpAgo], tmpCount + 1);
For Value2 = 0 To tmpCount - 1 Begin
If Close[Value2 + tmpAgo] = Value1 Then
RetCount = RetCount + 1;
End;
Return RetCount;
End;
{ ===============================================================================================}
Once Begin
ClearPrintLog;
m_dbTickUnit = MinMove / PriceScale;
m_dbTickPrice = MinMove / PriceScale * BigPointValue;
m_bValidEnvironment = (GetAppInfo( aiApplicationType ) = cChart);
MessageLog("Tick 단위 : ", m_dbTickUnit);
MessageLog("Tick 가격 : ", m_dbTickPrice);
MessageLog("Big Point : ", BigPointValue);
MessageLog("진입수량 : ", m_nOpenVolume);
End;
{ ===============================================================================================}
{ ======================================< STRATEGY CODES >=======================================}
{ ===============================================================================================}
If m_bValidEnvironment = True Then
Begin
m_bOrderSignaled = false;
stcst_fast = Stochastic( High, Low, Close, StochasticFast_Range, StochasticFast_FastK, StochasticFast_FastD, 1, outFastK, outFastD, outSlowK, outSlowD );
If MarketPosition = 0 AND m_bOrderSignaled = false Then Begin
If outFastK Crosses Above outFastD Then Begin
m_nTradeVolume = m_nOpenVolume;
BuyOrder_ThisClose(CurrentEntries, m_nTradeVolume, CurrentAsk, false);
m_bOrderSignaled = true;
End;
End;
If MarketPosition = 1 AND m_bOrderSignaled = false Then Begin
If outFastK Crosses Below outFastD Then Begin
m_nTradeVolume = CurrentContracts;
SellOrder_ThisClose(CurrentEntries, m_nTradeVolume, CurrentBid, false);
m_bOrderSignaled = true;
End;
End;
End;
2017-08-16
438
글번호 112055
답변완료
ts 이지랭귀지 코드를 예스랭귀지 코드로 변환
전략들이 트레이드스테이션 이지랭귀지로 되어 있어서
이 전략들을 예스랭귀지로 바꾸어서 검증 후 사용하려고 하는데요.
ts 이지코드를 복사해서 예스에 붙여넣고 검증하면 오류가 많이 뜨는데,,
혹시 ts 코드의 예약어들에 매칭되는 예스 랭귀지 코드 자료집이나 가이드가 있는지 알려주세요~
예스로 써야 주문이 나가는데 어렵네요
2017-08-16
286
글번호 112054
답변완료
시스템식 부탁드립니다.
시스템식 두 개 부탁드립니다.
*1번식
매수 : 단순이평 76선과 선행스팬2보다 위에 위치하고,
가장 최근에 출현한 음봉과 양봉의 고가를 돌파 시 매수
매수청산 : 가장 최근에 출현한 음봉과 양봉의 저가를 이탈 시 매도
매도 : 단순이평 76선과 선행스팬2보다 아래에 위치하고,
가장 최근에 출현한 음봉과 양봉의 저가를 이탈 시 매도
매도청산 : 가장 최근에 출현한 음봉과 양봉의 고가를 돌파 시 매수
-------------------
*2번식
매수 : 단순이평 190선과 선행스팬2보다 위에 위치하고,
가장 최근에 출현한 음봉 2개와 최근 양봉 한 개의 고가를 돌파 시 매수
매수청산 : 가장 최근에 출현한 양봉 2개와 최근 음봉 한 개의 저가를 이탈 시 매도
매도 : 단순이평 190선과 선행스팬2보다 아래에 위치하고,
가장 최근에 출현한 양봉 2개와 최근 음봉 한 개의 저가를 이탈 시 매도
매도청산 : 가장 최근에 출현한 음봉 2개와 최근 양봉 한 개의 고가를 돌파 시 매수
감사합니다.
2017-08-17
231
글번호 112053
답변완료
문의 드립니다.
지표 세가지를 만들고 싶습니다.
선물차트에서 1)옵션 등가 콜풋의 가격 차를 그래프로 만들고싶습니다.
2)옵션 등가 바로 위 행사가, 3) 등가 아래 행사가의 콜풋 차이를 알 수 있는 지표를 만들고싶은데.. 어떻게 해야할지 모르겠네요.
수식 부탁드립니다.
2017-08-16
238
글번호 112052
답변완료
문의 합니다
안녕하세요~~~
일목에서 기준선이 구름상단 돌파시 매수신호
반대로 기준선이 구름하단 돌파시 매도신호.
수치변경 가능토록 부탁드립니다.
그리고 매매시간도 설정가능토록 (예, 한국시간 18~익일02까지) 부탁드립니다.
감사합니다
수고하세요 ^*^
2017-08-16
229
글번호 112051
답변완료
수식부탁드립니다
연결선물지수 1분 봉입니다!!!
참조 data2 : 삼성전자 연결선물
*** 시가 갭 이후 9시30분 이내 포지션 진입 및 청산
[매수 1, 2]
1. 당일 시가가 +2.0pt 이상 갭 상승 출발하고 9시30분 이전에 선물이 고가에서 -2pt하락하였던 적이 있고
- 매수1 : 삼성전자 연결선물이 전일대비 +10,000만원 상승 할때 매수 1계약 진입
- 매수2 : 삼성전자 연결선물이 전일대비 +20,000만원 상승 할때 매수 1계약 진입
[매도 1, 2]
1. 당일 시가가 -2.0pt 이상 갭 하락 출발하고 9시30분 이전에 선물이 저가에서 +2pt상승하였던 적이 있고
- 매도1 : 삼성전자 연결선물이 전일대비 -10,000만원 하락 할때 매도 1계약 진입
- 매도2 : 삼성전자 연결선물이 전일대비 -20,000만원 하락 할때 매도 1계약 진입
[매수 3]
*** 장중 고가대비 -2.0pt 하락한 적 있고
- 매수3 : 저가대비 +0.50pt 반등하고 삼성전자 연결선물이 장중저가대비 +10,000원 상승할 때 매수 1계약 진입
[매도 3]
*** 장중 저가대비 +2.0pt 상승한 적 있고
- 매도3 : 고가대비 -0.50pt 반락하고 삼성전자 연결선물이 장중고가대비 -10,000원 하락할 때 매도 1계약 진입
위에 진입한 포지션에 대한 평가손익이 +1pt 일 경우 익절하고 -1.5pt일 경우 손절하는 수식부탁합니다.
그리고 미청산한 포지션은 장마감에 모두 청산합니다!!!
[강조수식 부탁드립니다]
강조 1 : 연결선물이 당일 고가보다 -2pt 하락하면 수직선을 굵은 빨강색으로 차트에 차팅하는 강조식부탁드립니다!!
강조 2 : 연결선물이 당일 저가보다 +2pt 상승하면 수직선을 굵은 파랑색으로 차트에 차팅하는 강조식부탁드립니다!!
- 감사합니다!!!
2017-08-21
283
글번호 112050
답변완료
물음표가 많이 나와요
수식복사해서 검증할려고 붙여넣기하면 물음표가 너무 많이 나오는데요 이거 왜이런건가요??
이상해서 메모장에다 다시복사한후 붙여넣기해도 안돼요
빈공간에 물음표가 생기는 현상입니다
2017-08-16
244
글번호 112049