文章 "MQL5 中的统计分布 - 取最佳的 R" - 页 11 1...456789101112131415161718...20 新评论 Stanislav Korotky 2016.11.12 16:55 #101 只有五号车才有吗?有计划推出四代吗? fxsaber 2016.11.12 17:08 #102 Stanislav Korotky: 这只在 5 个版本中出现吗?计划在 4 中使用吗?因此,在 MT4 中一切正常。这是一个标准的OBJ_BITMAP_LABEL+ 自定义资源。顺便说一下,MT4 的编译器比 MT5 更智能。// MT5 不出声,MT4 发出警告 - 检查运算符优先级,以防出错;使用括号说明优先级 Canvas.mqh m_pixels[y*m_width+x]=(r<<16|g<<8|b<<0|255<<24) &0xffffffff; 出现了一个错误(在 MT5 中不起作用,但在 MT4 中可以)。#property strict#include <Graphics/Graphic.mqh>double Func1(double x) { return MathPow(x,2); }double Func2(double x) { return MathPow(x,3); }double Func3(double x) { return MathPow(x,4); }void SaveObjects( const long chart_id = 0, const int SubWindow = -1 ){ const int Total = ObjectsTotal(chart_id, SubWindow, OBJ_BITMAP_LABEL); for (int i = 0; i < Total; i++) { const string Name = ObjectName(chart_id, i, SubWindow, OBJ_BITMAP_LABEL); string ResourceName; if (ObjectGetString(chart_id, Name, OBJPROP_BMPFILE, 0, ResourceName)) ResourceSave(ResourceName, Name + ".bmp"); // MT5 - false, MT4 - true }}void OnStart() { GraphPlot(Func1,Func2,Func3,-2,2,0.05,CURVE_LINES); SaveObjects(); } Discussion of article "Statistical 专家顾问 - 杂项问题 expert advisor - miscellaneous fxsaber 2016.11.14 07:43 #103 进行更正。//+------------------------------------------------------------------+// 更新屏幕上的对象(重绘)|//+------------------------------------------------------------------+void CCanvas::Update(const bool redraw) {//--- 检查 if(m_rcname==NULL) return;//--- 更新资源并重新绘制 if(ResourceCreate(m_rcname,m_pixels,m_width,m_height,0,0,0,m_format) && redraw) ChartRedraw(this.m_chart_id); } fxsaber 2016.11.14 08:02 #104 这就是//+------------------------------------------------------------------+//| 绘制吴的折线|//+------------------------------------------------------------------+void CCanvas::PolylineWu(int &x[],int &y[],const uint clr,const uint style=UINT_MAX);有零除法的地方。 fxsaber 2016.11.14 08:19 #105 如果数组的长度大于图表的宽度(以像素为单位),那就糟糕了。 fxsaber 2016.11.14 10:11 #106 我请求你们改进CGraphic 和 CCurve。它们是弱类。从它们继承几乎是不可能的,因为你需要的是私有的。我花了很长时间才进入状态,但我不得不自己重写这些类,使它们正常工作。我想制作一个交互式刻度线图--结果很粗糙(没有重写类)#include <Graphics/Graphic.mqh>void GetPrices( double &Bids[], double &Asks[], const int Count = 100 ){ MqlTick Ticks[]; const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_INFO, 0, Count); ArrayResize(Bids, Amount); ArrayResize(Asks, Amount); for (int i = 0; i < Amount; i++) { Bids[i] = Ticks[i].bid; Asks[i] = Ticks[i].ask; }} CGraphic* Graphic = new CGraphic;const string Name = "Graphic" +(string)(GetTickCount() + MathRand());void OnDeinit( const int Reason ){ Graphic.Destroy(); delete Graphic; ChartRedraw();}void GraphTicks( const double &Price1[], const double &Price2[] ){ Graphic.Destroy(); delete Graphic; Graphic = new CGraphic; Graphic.Create(0, Name, 0, 0, 0, (int)(ChartGetInteger(0, CHART_WIDTH_IN_PIXELS) * 0.8), (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS)); Graphic.AddCurve(Price1, CURVE_LINES); Graphic.AddCurve(Price2, CURVE_LINES); Graphic.PlotAllCurves(); Graphic.Update();}void OnTick(){ double Bids[], Asks[]; GetPrices(Bids, Asks); GraphTicks(Bids, Asks);}没有 DeleteCurve、ChangeCurve 等。 文章 "在MQL5中的三维建模" Discussion of article "Statistical Discussion of article "3D ivanivan_11 2016.11.14 10:56 #107 fxsaber:我请求你们改进 CGraphic 和 CCurve。它们是弱类。从它们继承几乎是不可能的,因为你需要的是私有的。我花了很长时间才进入状态,但我不得不自己重写这些类,使它们正常工作。我想制作一个交互式刻度线图--结果很粗糙(没有重写类)#include <Graphics/Graphic.mqh>void GetPrices( double &Bids[], double &Asks[], const int Count = 100 ){ MqlTick Ticks[]; const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_INFO, 0, Count); ArrayResize(Bids, Amount); ArrayResize(Asks, Amount); for (int i = 0; i < Amount; i++) { Bids[i] = Ticks[i].bid; Asks[i] = Ticks[i].ask; }} CGraphic* Graphic = new CGraphic;const string Name = "Graphic" +(string)(GetTickCount() + MathRand());void OnDeinit( const int Reason ){ Graphic.Destroy(); delete Graphic; ChartRedraw();}void GraphTicks( const double &Price1[], const double &Price2[] ){ Graphic.Destroy(); delete Graphic; Graphic = new CGraphic; Graphic.Create(0, Name, 0, 0, 0, (int)(ChartGetInteger(0, CHART_WIDTH_IN_PIXELS) * 0.8), (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS)); Graphic.AddCurve(Price1, CURVE_LINES); Graphic.AddCurve(Price2, CURVE_LINES); Graphic.PlotAllCurves(); Graphic.Update();}void OnTick(){ double Bids[], Asks[]; GetPrices(Bids, Asks); GraphTicks(Bids, Asks);}没有 DeleteCurve、ChangeCurve 等。 这就是这么短的代码吗? 不知道为什么,我还以为是一张表。 我在另一个软件中展示了一个可视化示例,是否可以将给定数量的波段与交易带结合起来,制作一个可视化的堆栈? Renat Fatkhullin 2016.11.14 10:59 #108 Stanislav Korotky: 只有五号车才有吗?有计划推出四代吗?只有五号四号已经完成了 fxsaber 2016.11.14 11:01 #109 ivanivan_11: 这是一个很短的代码吗? 不知道为什么,我以为这是一个表格。 是否有可能将给定波段数的堆栈与交易带结合起来进行可视化? 我在另一个软件中展示了一个可视化的例子。交互式绘制任何东西已经有很多年了。只是没有人(肯定是公开的)使用它。代码不短,但很长,而且很歪(结果也一样--闪烁)。该库需要认真改进。 Renat Fatkhullin 2016.11.14 11:13 #110 是的,这个库还只是测试运行。我们将对其进行整理,允许继承,添加方法,并消除因索引不正确而导致的崩溃。 1...456789101112131415161718...20 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
这只在 5 个版本中出现吗?计划在 4 中使用吗?
因此,在 MT4 中一切正常。这是一个标准的OBJ_BITMAP_LABEL+ 自定义资源。
顺便说一下,MT4 的编译器比 MT5 更智能。
m_pixels[y*m_width+x]=(r<<16|g<<8|b<<0|255<<24) &0xffffffff;
出现了一个错误(在 MT5 中不起作用,但在 MT4 中可以)。
#include <Graphics/Graphic.mqh>
double Func1(double x) { return MathPow(x,2); }
double Func2(double x) { return MathPow(x,3); }
double Func3(double x) { return MathPow(x,4); }
void SaveObjects( const long chart_id = 0, const int SubWindow = -1 )
{
const int Total = ObjectsTotal(chart_id, SubWindow, OBJ_BITMAP_LABEL);
for (int i = 0; i < Total; i++)
{
const string Name = ObjectName(chart_id, i, SubWindow, OBJ_BITMAP_LABEL);
string ResourceName;
if (ObjectGetString(chart_id, Name, OBJPROP_BMPFILE, 0, ResourceName))
ResourceSave(ResourceName, Name + ".bmp"); // MT5 - false, MT4 - true
}
}
void OnStart()
{
GraphPlot(Func1,Func2,Func3,-2,2,0.05,CURVE_LINES);
SaveObjects();
}
// 更新屏幕上的对象(重绘)|
//+------------------------------------------------------------------+
void CCanvas::Update(const bool redraw)
{
//--- 检查
if(m_rcname==NULL)
return;
//--- 更新资源并重新绘制
if(ResourceCreate(m_rcname,m_pixels,m_width,m_height,0,0,0,m_format) && redraw)
ChartRedraw(this.m_chart_id);
}
这就是
//| 绘制吴的折线|
//+------------------------------------------------------------------+
void CCanvas::PolylineWu(int &x[],int &y[],const uint clr,const uint style=UINT_MAX);
有零除法的地方。
我请求你们改进CGraphic 和 CCurve。它们是弱类。从它们继承几乎是不可能的,因为你需要的是私有的。我花了很长时间才进入状态,但我不得不自己重写这些类,使它们正常工作。
我想制作一个交互式刻度线图--结果很粗糙(没有重写类)
void GetPrices( double &Bids[], double &Asks[], const int Count = 100 )
{
MqlTick Ticks[];
const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_INFO, 0, Count);
ArrayResize(Bids, Amount);
ArrayResize(Asks, Amount);
for (int i = 0; i < Amount; i++)
{
Bids[i] = Ticks[i].bid;
Asks[i] = Ticks[i].ask;
}
}
CGraphic* Graphic = new CGraphic;
const string Name = "Graphic" +(string)(GetTickCount() + MathRand());
void OnDeinit( const int Reason )
{
Graphic.Destroy();
delete Graphic;
ChartRedraw();
}
void GraphTicks( const double &Price1[], const double &Price2[] )
{
Graphic.Destroy();
delete Graphic;
Graphic = new CGraphic;
Graphic.Create(0, Name, 0, 0, 0, (int)(ChartGetInteger(0, CHART_WIDTH_IN_PIXELS) * 0.8), (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS));
Graphic.AddCurve(Price1, CURVE_LINES);
Graphic.AddCurve(Price2, CURVE_LINES);
Graphic.PlotAllCurves();
Graphic.Update();
}
void OnTick()
{
double Bids[], Asks[];
GetPrices(Bids, Asks);
GraphTicks(Bids, Asks);
}
没有 DeleteCurve、ChangeCurve 等。
我请求你们改进 CGraphic 和 CCurve。它们是弱类。从它们继承几乎是不可能的,因为你需要的是私有的。我花了很长时间才进入状态,但我不得不自己重写这些类,使它们正常工作。
我想制作一个交互式刻度线图--结果很粗糙(没有重写类)
void GetPrices( double &Bids[], double &Asks[], const int Count = 100 )
{
MqlTick Ticks[];
const int Amount = CopyTicks(_Symbol, Ticks, COPY_TICKS_INFO, 0, Count);
ArrayResize(Bids, Amount);
ArrayResize(Asks, Amount);
for (int i = 0; i < Amount; i++)
{
Bids[i] = Ticks[i].bid;
Asks[i] = Ticks[i].ask;
}
}
CGraphic* Graphic = new CGraphic;
const string Name = "Graphic" +(string)(GetTickCount() + MathRand());
void OnDeinit( const int Reason )
{
Graphic.Destroy();
delete Graphic;
ChartRedraw();
}
void GraphTicks( const double &Price1[], const double &Price2[] )
{
Graphic.Destroy();
delete Graphic;
Graphic = new CGraphic;
Graphic.Create(0, Name, 0, 0, 0, (int)(ChartGetInteger(0, CHART_WIDTH_IN_PIXELS) * 0.8), (int)ChartGetInteger(0, CHART_HEIGHT_IN_PIXELS));
Graphic.AddCurve(Price1, CURVE_LINES);
Graphic.AddCurve(Price2, CURVE_LINES);
Graphic.PlotAllCurves();
Graphic.Update();
}
void OnTick()
{
double Bids[], Asks[];
GetPrices(Bids, Asks);
GraphTicks(Bids, Asks);
}
没有 DeleteCurve、ChangeCurve 等。
只有五号车才有吗?有计划推出四代吗?
只有五号
四号已经完成了
这是一个很短的代码吗? 不知道为什么,我以为这是一个表格。 是否有可能将给定波段数的堆栈与交易带结合起来进行可视化? 我在另一个软件中展示了一个可视化的例子。
交互式绘制任何东西已经有很多年了。只是没有人(肯定是公开的)使用它。
代码不短,但很长,而且很歪(结果也一样--闪烁)。该库需要认真改进。
是的,这个库还只是测试运行。
我们将对其进行整理,允许继承,添加方法,并消除因索引不正确而导致的崩溃。