MT4中的填充矩形 - 页 2 12345 新评论 honest_knave 2015.03.12 16:19 #11 不知道我之前的帖子发生了什么(是关于CChartObject::Fill(const bool new_fill) ...),但请贴出更多你的代码,你实际上调用这个来创建你的矩形。 [删除] 2015.03.12 16:36 #12 honest_knave: 不知道我之前的帖子怎么了(关于CChartObject::Fill(const bool new_fill) ...) 但请贴出更多你的代码,在那里你真正调用这个来创建你的矩形。当然,就是这里。 //+------------------------------------------------------------------+ //| ChartObjectsShapes.mqh | //| Copyright 2009-2013, MetaQuotes Software Corp. | //| https://www.mql5.com | //+------------------------------------------------------------------+ //| All shapes. | //+------------------------------------------------------------------+ #include "ChartObject.mqh" //+------------------------------------------------------------------+ //| Class CChartObjectRectangle. | //| Purpose: Class of the "Rectangle" object of chart. | //| Derives from class CChartObject. | //+------------------------------------------------------------------+ class CChartObjectRectangle : public CChartObject { public: CChartObjectRectangle(void); ~CChartObjectRectangle(void); //--- method of creating the object bool Create(long chart_id,const string name,const int window, const datetime time1,const double price1, const datetime time2,const double price2); //--- method of identifying the object virtual int Type(void) const { return(OBJ_RECTANGLE); } }; //+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ CChartObjectRectangle::CChartObjectRectangle(void) { } //+------------------------------------------------------------------+ //| Destructor | //+------------------------------------------------------------------+ CChartObjectRectangle::~CChartObjectRectangle(void) { } +------------------------------------------------------------------+ //| Create object "Rectangle" | //+------------------------------------------------------------------+ bool CChartObjectRectangle::Create(long chart_id,const string name,const int window, const datetime time1,const double price1, const datetime time2,const double price2) { if(!ObjectCreate(chart_id,name,OBJ_RECTANGLE,window,time1,price1,time2,price2)) return(false); ObjectSetInteger(chart_id,name,OBJPROP_FILL,true); if(!Attach(chart_id,name,window,2)) return(false); //--- successful return(true); } //+------------------------------------------------------------------+ //| Class CChartObjectTriangle. | //| Purpose: Class of the "Triangle" object of chart. | //| Derives from class CChartObject. | //+------------------------------------------------------------------+ class CChartObjectTriangle : public CChartObject { public: CChartObjectTriangle(void); ~CChartObjectTriangle(void); //--- method of creating the object bool Create(long chart_id,const string name,const int window, const datetime time1,const double price1, const datetime time2,const double price2, const datetime time3,const double price3); //--- method of identifying the object virtual int Type(void) const { return(OBJ_TRIANGLE); } }; //+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ CChartObjectTriangle::CChartObjectTriangle(void) { } //+------------------------------------------------------------------+ //| Destructor | //+------------------------------------------------------------------+ CChartObjectTriangle::~CChartObjectTriangle(void) { } //+------------------------------------------------------------------+ //| Create object "Triangle" | //+------------------------------------------------------------------+ bool CChartObjectTriangle::Create(long chart_id,const string name,const int window, const datetime time1,const double price1, const datetime time2,const double price2, const datetime time3,const double price3) { if(!ObjectCreate(chart_id,name,OBJ_TRIANGLE,window,time1,price1,time2,price2,time3,price3)) return(false); if(!Attach(chart_id,name,window,3)) return(false); //--- successful return(true); } //+------------------------------------------------------------------+ //| Class CChartObjectEllipse. | //| Purpose: Class of the "Ellipse" object of chart. | //| Derives from class CChartObject. | //+------------------------------------------------------------------+ class CChartObjectEllipse : public CChartObject { public: CChartObjectEllipse(void); ~CChartObjectEllipse(void); //--- method of creating the object bool Create(long chart_id,const string name,const int window, const datetime time1,const double price1, const datetime time2,const double price2, const datetime time3,const double price3); //--- method of identifying the object virtual int Type(void) const { return(OBJ_ELLIPSE); } }; //+------------------------------------------------------------------+ //| Constructor | //+------------------------------------------------------------------+ CChartObjectEllipse::CChartObjectEllipse(void) { } //+------------------------------------------------------------------+ //| Destructor | //+------------------------------------------------------------------+ CChartObjectEllipse::~CChartObjectEllipse(void) { } //+------------------------------------------------------------------+ //| Create object "Ellipse" | //+------------------------------------------------------------------+ bool CChartObjectEllipse::Create(long chart_id,const string name,const int window, const datetime time1,const double price1, const datetime time2,const double price2, const datetime time3,const double price3) { if(!ObjectCreate(chart_id,name,OBJ_ELLIPSE,window,time1,price1,time2,price2,time3,price3)) return(false); if(!Attach(chart_id,name,window,3)) return(false); //--- successful return(true); } //+------------------------------------------------------------------+ Carl Schreiber 2015.03.12 16:54 #13 请编辑你的帖子并使用SRC-按钮输入你的代码 honest_knave 2015.03.12 16:54 #14 我想你误解了我的意思......这是一个包含文件。在其他地方,你将实际调用这些东西来创建东西......例如,rect你会想使用类似rect.Fill(true)的东西。 [删除] 2015.03.12 16:56 #15 honest_knave:我想你误解了我的意思......这是一个包含文件。在其他地方,你将实际调用这些东西来创建东西......例如,rect你会想使用类似rect.Fill(true)的东西。I don't know a thing about this stuff, brother. Please do guide me through this, for goodness sake :) [删除] 2015.03.12 16:59 #16 gooly: 请编辑你的帖子并使用SRC-按钮输入你的代码 完成了,至于我的问题...有什么建议吗? honest_knave 2015.03.12 17:01 #17 你需要帮助我们来帮助你。这是一个标准的包含文件。我们需要看到你的指标/EA在哪里实际使用这些东西。我们只看到了图片的一部分......而且不是正确的那一部分 [删除] 2015.03.12 17:02 #18 honest_knave:你需要帮助我们来帮助你。这是一个标准的包含文件。我们需要看到你的指标/EA在哪里实际使用这些东西。我们只看到了图片的一部分......而且不是正确的那一部分 好的,我明白了:我应该在哪里寻找正确的文件,它叫什么? honest_knave 2015.03.12 17:04 #19 你一定是在你的图表中添加了一个指标/EA/脚本来绘制你遇到问题的这些矩形......我们需要看到其中的内容。恐怕我们不知道那叫什么。我也怀疑这个文件不会使用那个包含文件......但我们会看到的 [删除] 2015.03.12 17:09 #20 这就是我所看到的一切... 12345 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
,但请贴出更多你的代码,你实际上调用这个来创建你的矩形。
不知道我之前的帖子怎么了(关于CChartObject::Fill(const bool new_fill) ...)
但请贴出更多你的代码,在那里你真正调用这个来创建你的矩形。
当然,就是这里。
我想你误解了我的意思......这是一个包含文件。
在其他地方,你将实际调用这些东西来创建东西......例如,rect
你会想使用类似rect.Fill(true)的东西。
我想你误解了我的意思......这是一个包含文件。
在其他地方,你将实际调用这些东西来创建东西......例如,rect
你会想使用类似rect.Fill(true)的东西。
请编辑你的帖子并使用SRC-按钮输入你的代码
你需要帮助我们来帮助你。这是一个标准的包含文件。
我们需要看到你的指标/EA在哪里实际使用这些东西。
我们只看到了图片的一部分......而且不是正确的那一部分
你需要帮助我们来帮助你。这是一个标准的包含文件。
我们需要看到你的指标/EA在哪里实际使用这些东西。
我们只看到了图片的一部分......而且不是正确的那一部分
你一定是在你的图表中添加了一个指标/EA/脚本来绘制你遇到问题的这些矩形......我们需要看到其中的内容。
恐怕我们不知道那叫什么。我也怀疑这个文件不会使用那个包含文件......但我们会看到的
这就是我所看到的一切...