[存档!]任何菜鸟问题,为了不给论坛添乱。专业人士,不要与它擦肩而过。没有你,哪里都不能去 - 2. - 页 290

 
artmedia70:

我认为我们在这里不能没有某种自己的秩序簿记。

创建你自己的订单数组,并在其中存储所有必要的虚拟停止数据。

你能更详细地介绍一下这个问题吗?

这是否已经在任何地方实施? 我的搜索没有发现任何东西(()。

 
Centuriy:

你能告诉我更多关于它的情况吗?

我的搜索没有任何结果(!)。

它可以作为专家顾问的一个单独功能来实现,也可以作为一个独立的专家顾问。

我已经把它作为自定义EA的一个功能来实现,但这个世界上的一切都可以改变,只要我有动力......

 
Centuriy:

你能更详细地介绍一下这个问题吗?

我的搜索毫无结果(?)。


看一下这个,那里有几个选择。

http://www.fx4u.ru/rinki-forex-commodities-cfd-futures-f14/yazik-programmirovaniya-mql4-opisanie-mts-skrip-f16/virtualniy-treyling-stop-ot-1-punkta-t12781.html

很抱歉提供了第三方链接

 

大家好,请问如何删除1号缓冲区(Buffer1[])的显示?

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_style1 0
#property indicator_color2 Red
#property indicator_width2 2
#property indicator_style2 0

double Buffer1[];
double Buffer2[];

int init(){
SetIndexBuffer(0,Buffer1);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(1,Buffer2);
SetIndexStyle(1,DRAW_LINE);
return(0);
}
int start(){
for(int i=0;i<Bars;i++){
Buffer1[i]=iClose("EURUSD",0,i)-1;
Buffer2[i]=(Buffer1[i]+Buffer1[i+1]+Buffer1[i+2])/3;
}
return(0);
}

 
Figar0:


看一下这个,那里有几个选项。

作为一个人,非常感谢你!

 

tmt0086:

大家好,如何从显示中删除1号缓冲区(Buffer1[])?


一个快速

SetIndexStyle(0, DRAW_NONE)。

 
sergeev:


迅速地

SetIndexStyle(0, DRAW_NONE)。


但如果不快呢?因为它干扰了((比方说,它的边界很高,干扰了正常的工作。它只是帮助了图表中的缓冲区消失了,但这个缓冲区的边界仍然存在。
 
tmt0086:

大家好,请问如何删除1号缓冲区(Buffer1[])的显示?

#property indicator_separate_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_style1 0
#property indicator_color2 Red
#property indicator_width2 2
#property indicator_style2 0

double Buffer1[];
double Buffer2[];

int init(){
SetIndexBuffer(0,Buffer1);
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(1,Buffer2);
SetIndexStyle(1,DRAW_LINE);
return(0);
}
int start(){
for(int i=0;i<Bars;i++){
Buffer1[i]=iClose("EURUSD",0,i)-1;
Buffer2[i]=(Buffer1[i]+Buffer1[i+1]+Buffer1[i+2])/3;
}
return(0);
}

像这样试试吧。
______________________________________

#property indicator_buffers1

调换缓冲区并删除

SetIndexBuffer(1,Buffer2)。
SetIndexStyle(1,DRAW_LINE)。
______________________________________
老实说,我没有测试过,但它应该能行。
或者你不需要交换任何东西,只需删除不必要的缓冲区的设置参数,用1 代替2

 
artmedia70:

像这样试试吧。
______________________________________

#property indicator_buffers1

调换缓冲区并删除

SetIndexBuffer(1,Buffer2)。
SetIndexStyle(1,DRAW_LINE)。
______________________________________
老实说,我没有测试过,但它应该是有效的。


#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_style1 0

double Buffer1[];
double Buffer2[];

int init(){
SetIndexBuffer(0,Buffer2);
SetIndexStyle(0,DRAW_LINE);
return(0);
}
int start(){
for(int i=0;i<Bars;i++){
Buffer1[i]=iClose("EURUSD",0,i)-1;
Buffer2[i]=(Buffer1[i]+Buffer1[i+1]+Buffer1[i+2])/3;
}
return(0);
}
对吗?
 
像这样
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
#property indicator_width1 2
#property indicator_style1 0

double Buffer1[], Buffer2[];

int init()
{
  IndicatorBuffers(2);
  SetIndexBuffer(0,Buffer2); SetIndexStyle(0,DRAW_LINE);
  SetIndexBuffer(1,Buffer1);
  return(0);
}

int start()
{
  for(int i=0;i<Bars;i++)
  {
    Buffer1[i]=iClose("EURUSD",0,i)-1;
    Buffer2[i]=(Buffer1[i]+Buffer1[i+1]+Buffer1[i+2])/3;
  }
  return(0);
}

你确实必须使用一个缓冲器。