New York
Experience: Advanced
Platform: SC, TN
Trading: ES
Posts: 85 since Sep 2014
Thanks Given: 10
Thanks Received: 9
|
I am slowly trying to figure out code that was done for me. I am trying to get "^" to display in the middle of the volume bars. At the moment it is near the bottom, all at the same level. Any help is appreciated. I am guessing it has to do with the "VerticalPositionValue". Am I able to define it in this function.
Thanks
void DrawLetters(int verticalAlign, SCStudyInterfaceRef sg, SCString letter, int index, float VerticalPositionValue, int lineNum)
{
s_UseTool Tool;
int UniqueLineNumber = lineNum;
Tool.Clear();
Tool.Region = sg.GraphRegion;
Tool.ChartNumber = sg.ChartNumber;
Tool.DrawingType = DRAWING_TEXT;
Tool.LineNumber = UniqueLineNumber;
if(letter == "^")
{ Tool.FontSize = 14;
Tool.TextAlignment = DT_CENTER|DT_BOTTOM;
Tool.Color = RGB(255,255,255);
Tool.FontBold = 1;
}
else if (letter == "D" || letter == "WD")
{ Tool.FontSize = 10;
Tool.TextAlignment = DT_CENTER|DT_BOTTOM;
Tool.Color = RGB(0,0,255);
Tool.FontBold = TRUE;
}
else
{ Tool.FontSize = 16;
Tool.TextAlignment = DT_CENTER|verticalAlign;
Tool.Color = RGB(0,0,255);
Tool.BeginValue = VerticalPositionValue;
Tool.FontBold = TRUE;
}
Tool.FontFace = "Arial";
Tool.Text = letter;
Tool.BeginIndex = index;
Tool.AddMethod = UTAM_ADD_OR_ADJUST;
sg.UseTool(Tool);
}
|