Print("The coordinates of the mouse click on the chart are: x = ",lparam," y = ",dparam);
Ziheng Zhuang:
HI Ziheng
首先感谢您的回复,但是还是不行
我的想法是,我的想法是点击K先,先记录XY坐标,然后找到对应K先的时间,开盘价等信息,但是id==CHARTEVENT_CLICK 时,消息里看不到打印的消息
不知道你看到哪里去了。
要不你试试这个,看看图表上有没有消息。
Comment("The coordinates of the mouse click on the chart are: x = ",lparam," y = ",dparam);
Ziheng Zhuang:
不知道你看到哪里去了。
要不你试试这个,看看图表上有没有消息。
你的意思是说,日志里不会打印这些?
alan:
你的意思是说,日志里不会打印这些?
日志不输出任何“打印”的信息。
所有EA,指标,脚本,调用Print()的“打印”信息都在“Expert”标签页。
EA这么写,为什么不能打印XY坐标
//+------------------------------------------------------------------+
//| ChartEvent function |
//+------------------------------------------------------------------+
void OnChartEvent(const int id,
const long &lparam,
const double &dparam,
const string &sparam)
{
if (id==CHARTEVENT_CLICK)
{
printf("The coordinates of the mouse click on the chart are: x = ",lparam," y = ",dparam);
}
}