예스스탁
예스스탁 답변
2024-11-19 14:38:23
안녕하세요
예스스탁입니다.
input : leftLenH(10);
input : rightLenH(10);
input : textColorH(black);
input : labelColorH(white);
input : leftLenL(10);
input : rightLenL(10);
input : textColorL(black);
input : labelColorL(white);
var : Ph(0),pl(0),tx(0);
if SwingHigh(1,h,leftLenH, rightLenH,leftLenH+rightLenH+1) != -1 Then
{
ph = h[rightLenH];
tx = Text_New(sDate[rightLenH],sTime[rightLenH],PH,NumToStr(PH,2));
Text_SetStyle(tx,2,1);
Text_SetColor(tx,Black);
Text_SetSize(tx,12);
}
if Swinglow(1,l,leftLenL, rightLenL,leftLenL+rightLenL+1) != -1 Then
{
pl = l[rightLenH];
tx = Text_New(sDate[rightLenL],sTime[rightLenL],PL,NumToStr(PL,2));
Text_SetStyle(tx,2,0);
Text_SetColor(tx,Black);
Text_SetSize(tx,12);
}
즐거운 하루되세요
> 만강 님이 쓴 글입니다.
> 제목 : 문의 드립니다
>
안녕하세요
트레이딩 코드 전환 부탁드립니다
lengthGroupTitle = "LENGTH LEFT / RIGHT"
colorGroupTitle = "Text Color / Label Color"
leftLenH = input.int(title="Pivot High", defval=10, minval=1, inline="Pivot High", group=lengthGroupTitle)
rightLenH = input.int(title="/", defval=10, minval=1, inline="Pivot High", group=lengthGroupTitle)
textColorH = input(title="Pivot High", defval=color.black, inline="Pivot High", group=colorGroupTitle)
labelColorH = input(title="", defval=color.white, inline="Pivot High", group=colorGroupTitle)
leftLenL = input.int(title="Pivot Low", defval=10, minval=1, inline="Pivot Low", group=lengthGroupTitle)
rightLenL = input.int(title="/", defval=10, minval=1, inline="Pivot Low", group=lengthGroupTitle)
textColorL = input(title="Pivot Low", defval=color.black, inline="Pivot Low", group=colorGroupTitle)
labelColorL = input(title="", defval=color.white, inline="Pivot Low", group=colorGroupTitle)
ph = ta.pivothigh(leftLenH, rightLenH)
pl = ta.pivotlow(leftLenL, rightLenL)
drawLabel(_offset, _pivot, _style, _color, _textColor) =>
if not na(_pivot)
label.new(bar_index[_offset], _pivot, str.tostring(_pivot, format.mintick), style=_style, color=_color, textcolor=_textColor)
drawLabel(rightLenH, ph, label.style_label_down, labelColorH, textColorH)
drawLabel(rightLenL, pl, label.style_label_up, labelColorL, textColorL)
감사합니다