예스스탁
예스스탁 답변
2020-11-24 15:30:51
안녕하세요
예스스탁입니다.
올리신 내용은 지표와 관련된 내용으로 스팟으로 구현이 되는 부분이 아닙니다.
지표의 값은 특정주기(일,주,월,분,틱,초)의 데이타가 필요한데
스팟은 실시간 데이타만 받고 과거 특정주기의 데이타가 없습니다.
지표를 이용하는 내용은 예스랭귀지로 작성해서 차트에서 신호가 발생하게 작성될수밖에 없습니다.
예스랭귀지 시스템식으로 작성해 드립니다.
var : HH(0),LL(0),RR(0),mav1(0),mav2(0);
var : Bcond1(False),Bcond2(False),Scond1(False),Scond2(False);
HH = dayhigh;
LL = DayLow;
RR = HH-LL;
mav1 = ma(c,5);
mav2 = ma(C,20);
value1 = HH-RR*0.736;
value2 = HH-RR*0.236;
Value3 = HH-RR*0.382;
BCond1 = min(C,O) > value1;
BCond2 = min(C,O) > value2;
SCond1 = max(C,O) < value2;
SCond2 = max(C,O) < value1;
if MarketPosition == 0 and
mav1 > mav2 and
CountIf(BCond1 == true,3) == 3 and
BCond1[3] == False Then
Buy("B1",AtMarket);
if MarketPosition == 0 and
mav1 > mav2 and
CountIf(BCond2 == true,3) == 3 and
BCond2[3] == False Then
Buy("B2",AtMarket);
if MarketPosition == 0 and
mav1 < mav2 and
CountIf(SCond1 == true,3) == 3 and
SCond1[3] == False Then
Sell("S1",AtMarket);
if MarketPosition == 0 and
mav1 < mav2 and
CountIf(SCond2 == true,3) == 3 and
SCond2[3] == False Then
Sell("S2",AtMarket);
if MarketPosition == 1 Then
{
if MaxEntries == 1 and IsEntryName("B1") == true and EntryPrice > Value1[BarsSinceEntry]+PriceScale*6 Then
Buy("bb1",AtLimit,Value1+PriceScale*6);
if MaxEntries == 1 and IsEntryName("B2") == true and EntryPrice > Value2[BarsSinceEntry]+PriceScale*6 Then
Buy("bb2",AtLimit,Value2+PriceScale*6);
if mav1 < mav2 and
CountIf(max(C,O) < value2,3) == 3 and
C <= Value2-PriceScale*6 Then
ExitLong();
if mav1 < mav2 and
CountIf(max(C,O) < value1 and max(C,O) > value2,3) == 3 and
C <= Value1-PriceScale*6 Then
ExitLong();
}
if MarketPosition == -1 Then
{
if MaxEntries == 1 and IsEntryName("S1") == true and EntryPrice < Value2[BarsSinceEntry]-PriceScale*6 Then
Sell("ss1",AtLimit,Value2-PriceScale*6);
if MaxEntries == 1 and IsEntryName("S2") == true and EntryPrice < Value1[BarsSinceEntry]-PriceScale*6 Then
Sell("ss2",AtLimit,Value1-PriceScale*6);
if mav1 > mav2 and
CountIf(min(C,O) > value1,3) == 3 and
C >= Value1+PriceScale*6 Then
ExitShort();
if mav1 > mav2 and
CountIf(min(C,O) > value2 and min(C,O) < value1,3) == 3 and
C >= Value2+PriceScale*6 Then
ExitShort();
}
즐거운 하루되세요
> 불기둥짱 님이 쓴 글입니다.
> 제목 : 예스스팟 수식 부탁드립니다.
> 수고가 많으십니다.
예스스팟 수식을 부탁드립니다.
내용은 첨부파일로 올려드렸습니다.
말이 길고 복잡해보여도
각기 패턴은 비슷합니다.
좋은 하루 되세요!