谢谢老大,终于画出来了,也把代码放上来,希望大家共同进步。。。。
[C++] 纯文本查看 复制代码//画价格右标签
bool ArrowRightPriceCreate(long chart_ID=0,
string name="RightPrice",
int sub_window=0,
datetime time=0,
double price=0,
color clr=clrRed,
ENUM_LINE_STYLE style=STYLE_SOLID,
int width=1)
{
//创建右价格标签时,先删除以前的同名价格标签
ArrowRightPriceDelete(chart_ID,name);
ResetLastError();
if(!ObjectCreate(chart_ID,name,OBJ_ARROW_RIGHT_PRICE,sub_window,time,price))
{
Print(__FUNCTION__,
": 创建右价格标签时出错=",GetLastError());
return(false);
}
ObjectSetInteger(chart_ID,name,OBJPROP_COLOR,clr);
ObjectSetInteger(chart_ID,name,OBJPROP_STYLE,style);
ObjectSetInteger(chart_ID,name,OBJPROP_WIDTH,width);
return(true);
}
//+------------------------------------------------------------------+
//删除右价格标签
bool ArrowRightPriceDelete(long chart_ID=0,string name="RightPrice")
{
if(ObjectFind(chart_ID,name)
|