답변완료
수식 문의드립니다.
안녕하세요.
당일 시가 매수 거래 수식을 일봉에 적용했는데
작용이 안되는 종목이 있어서 문의드립니다.
오늘 삐아라는 종목을 거래하려고 장전에 걸어놨는데 해당 종목은 거래가 발생하지 않았고(그림 첨부),
다른 종목에 걸어보니 정상적으로 신호가 발생했습니다.
(3s, 홈케스트 그림 첨부)
혹시 어떤 부분에 문제가 있는지 문의드립니다.
현재 제가 해외에 나와 있어서 기존 질문은 돌아가서 다시 연락드리겠습니다.
감사합니다. 행복한 하루 보내세요.
var : 매수금액(10000000);
if marketposition ==0 and sDate>=20240528 then
{
if nextbarsdate !=sdate then
{
buy("b1", AtMarket, nextbaropen, Floor(매수금액*2/NextBarOpen));
buy("b2", AtLimit, nextbaropen*0.98, Floor(매수금액/(NextBarOpen*0.98)));
buy("b3", AtLimit, nextbaropen*0.97, Floor(매수금액/(NextBarOpen*0.97)));
buy("b4", AtLimit, nextbaropen*0.96, Floor(매수금액/(NextBarOpen*0.96)));
exitlong("bx1", atlimit, NextBarOpen * 1.03, "",Floor(매수금액*(MaxEntries+1))/4,1);
exitlong("bx1-1", atlimit, NextBarOpen * 1.05, "",Floor(매수금액*(MaxEntries+1))/4,1);
exitlong("bx1-2", atlimit, NextBarOpen * 1.07, "",Floor(매수금액*(MaxEntries+1))/4,1);
exitlong("bx1-3", atlimit, NextBarOpen * 1.10);
exitlong("bx2", atstop, NextBarOpen * 0.95, "",Floor(매수금액*(MaxEntries+1))/2,1);
exitlong("bx2-1", atstop, NextBarOpen * 0.94);
}
}
2024-05-29
872
글번호 180133
시스템
답변완료
전환추세 크기 둘
Input : 전환(0.2);
Var:j(0),jj(0),HH(0),LL(0),hiBar(0),loBar(0),최종꼭지점(""),처리구분(""), TL(0),TX(0),TX2(0);
Array:고[10,4](0),저[10,4](0);
HH = H;
LL = L;
If Index == 0 Then
{
고[1,1] = HH;
고[1,2] = 0;
고[1,3] = sDate;
고[1,4] = sTime;
저[1,1] = LL;
저[1,2] = 0;
저[1,3] = sDate;
저[1,4] = sTime;
}
If Index > 0 Then
{
hiBar = hiBar + 1;
loBar = loBar + 1;
}
If HH[hiBar] < HH Then hiBar = 0;
If LL[loBar] > LL Then loBar = 0;
Condition1 = 저[1,1]+전환 <= HH and hiBar == 0;
Condition2 = 고[1,1]-전환 >= LL and loBar == 0;
처리구분 = "";
If Condition1 and Condition2 Then
{
If 최종꼭지점 == "저점" Then
{
If 저[1,1] > LL Then 처리구분 = "저점처리";
Else 처리구분 = "고점처리";
}
Else If 최종꼭지점 == "고점" Then
{
If 고[1,1] < HH Then 처리구분 = "고점처리";
Else 처리구분 = "저점처리";
}
}
Else If Condition1 Then 처리구분 = "고점처리";
Else If Condition2 Then 처리구분 = "저점처리";
If 처리구분 == "고점처리" Then
{
If 최종꼭지점 == "저점" Then
{
For j = 10 DownTo 2
{
For jj = 1 To 4
{
고[j,jj] = 고[j-1,jj];
}
}
고[1,1] = HH[hiBar];
고[1,2] = Index - hiBar;
고[1,3] = sDate[hiBar];
고[1,4] = sTime[hiBar];
hiBar = -1;
loBar = -1;
TL = TL_New(저[1,3],저[1,4],저[1,1],고[1,3],고[1,4],고[1,1]);
TL_SetSize(TL,1);
TL_SetColor(TL,RED);
Text_SetSize(tx,25);
Text_SetColor(tx,Blue);
Text_SetStyle(tx,1,0);
Text_SetBold(tx,1);
if abs(고[1,1][1]-저[1,1][1]) < 0.5 Then
Text_Delete(tx);
TX = Text_New(고[1,3],고[1,4],고[1,1],NumToStr(고[1,1]-저[1,1],2));
Text_SetSize(tx,25);
Text_SetColor(tx,Red);
Text_SetStyle(tx,1,1);
Text_SetBold(tx,1);
}
Else If 고[1,1] < HH[hiBar] Then
{
고[1,1] = HH[hiBar];
고[1,2] = Index - hiBar;
고[1,3] = sDate[hiBar];
고[1,4] = sTime[hiBar];
hiBar = -1;
loBar = -1;
TL_SetEnd(TL,고[1,3],고[1,4],고[1,1]);
Text_SetString(TX,NumToStr(고[1,1]-저[1,1],2));
Text_SetLocation(TX,고[1,3],고[1,4],고[1,1]);
}
최종꼭지점 = "고점";
Plot1(고[1,1]);
NoPlot(2);
}
If 처리구분 == "저점처리" Then
{
If 최종꼭지점 == "고점" Then
{
For j = 10 DownTo 2
{
For jj = 1 To 4
{
저[j,jj] = 저[j-1,jj];
}
}
저[1,1] = LL[loBar];
저[1,2] = Index - loBar;
저[1,3] = sDate[loBar];
저[1,4] = sTime[loBar];
hiBar = -1;
loBar = -1;
TL = TL_New(고[1,3],고[1,4],고[1,1],저[1,3],저[1,4],저[1,1]);
TL_SetSize(TL,1);
TL_SetColor(TL,BLUE);
Text_SetSize(tx,25);
Text_SetColor(tx,Red);
Text_SetStyle(tx,1,1);
Text_SetBold(tx,1);
if abs(고[1,1][1]-저[1,1][1]) < 0.5 Then
Text_Delete(tx);
TX = Text_New(저[1,3],저[1,4],저[1,1],NumToStr(저[1,1]-고[1,1],2));
Text_SetSize(tx,25);
Text_SetColor(tx,Blue);
Text_SetStyle(tx,1,0);
Text_SetBold(tx,1);
}
Else If 저[1,1] > LL[loBar] Then
{
저[1,1] = LL[loBar];
저[1,2] = Index - loBar;
저[1,3] = sDate[loBar];
저[1,4] = sTime[loBar];
hiBar = -1;
loBar = -1;
TL_SetEnd(TL,저[1,3],저[1,4],저[1,1]);
Text_SetString(TX,NumToStr(고[1,1]-저[1,1],2));
Text_SetLocation(TX,저[1,3],저[1,4],저[1,1]);
}
최종꼭지점 = "저점";
Plot2(저[1,1]);
NoPlot(1);
}
직전 하락추세선의 크기가 0.5 이상에서 양전환된 후, 바로 다음 하락추세선의 크기가 0.5p에 도달하면 세로선. (0.5 이상 연속 둘) 감사합니다.
2024-05-29
1034
글번호 180123
지표