[警告关闭!]任何新手问题,为了不给论坛添乱。专业人士,不要走过。没有你,哪里都不能去。 - 页 250

 
AndBar >> :
在这里,我们可以看到,在我们的生活中,有很多人都在为我们的生活而努力,有很多人都在为我们的生活而努力,有很多人在为我们的生活而努力。在这个问题上,我们要做的是,在全球范围内,我们要为我们的客户提供更多的服务。Zaranee spasubo.

IsTradeContextBusy()

以下是状态检查功能。https://docs.mql4.com/ru/check

PS 我不是专家。:(

 

对黄金交易商 : spasubo.


汝等为我,我为汝等。


如果你想测试一下,你就会发现你的测试结果与你的工作相差甚远,(你可以证明你的战略是正确的)。


Zaranee spasubo.

 
AndBar писал(а)>>

对黄金交易商 : spasubo.

汝等为我,我为汝等。

如果你想测试一下,你就会发现你的测试结果与你的工作相差甚远,(你可以证明你的战略是正确的)。

Zaranee spasubo.

专家顾问可以直接参考其他工具和时间框架。你不必使用一个文件。但在这个文件的帮助下,可以做到这一点。

 
Vinin >> :

该EA可以直接引用其他工具和时间框架。你不必使用一个文件。虽然,我们可能通过它(文件)做所有事情。

在这里,我想说的是,我们要做的是把我们的工作做得更好,把我们的工作做得更好。

 

帮助 ind.不画SMA!!!

//+------------------------------------------------------------------+
//|                                                maalert  sma.mq4 |
//|                      Copyright © 2009, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Red

extern int PeriodMA= 55;
extern int METHOD_MA=MODE_SMA;
extern int X= 1;
extern int Limit=5440;
extern string    SoundFileName="alert.wav";
extern bool      ActiveSignal=true;
extern bool      ActiveAlert=true;

double maH;
double maL;
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0, maH);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1, maL);
   SetIndexLabel(0,"MA");
//----
   return(0);
  }
//+------------------------------------------------------------------+
int start()
  {
//--------------------------------------------------------------
   maL         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_LOW,  0);
   maH         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_HIGH, 0);
 //--------------------------------------------------------------
  if(Bid> maH)
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   
   
   if(Bid< maL)
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   return(0);
  }
//+------------------------------------------------------------------+
缺少什么?谢谢。
 
costy_ писал(а)>>

帮助 ind.不画SMA!!!

你错过了什么?>>谢谢你。

而你并没有做任何事情来使它画出来。

 
Roger >> :

而你并没有做任何事情来使它画出来。

那么到底是什么...

SetIndexDrawBegin(0,0);
,,,
 
costy_ >> :

帮助Ind.不画SMA!!!。

你错过了什么?>>谢谢你。

在俄罗斯,我们可以看到,在我们的国家里,有很多人都在为他们的生活而奔波,而他们的生活也在不断地改变着。


Dlya prumera:


double ExtMapBuffer1[];
double ExtMapBuffer2[];
-------------------- 


ExtMapBuffer1[i]
  = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_LOW,  0);
ExtMapBuffer2[i]
 = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_HIGH, 0);

ny u eto vse delo oformu v tsukl

 
AndBar >> :

在俄罗斯,我们可以看到,在我们的国家里,有很多人都在为他们的生活而奔波,而他们的生活也在不断地改变着。


Dlya prumera:


>>谢谢你!

//+------------------------------------------------------------------+
//|                                                maalert  sma.mq4 |
//|                      Copyright © 2009, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2009, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 8
#property indicator_color1 Red
#property indicator_color2 Red

extern int PeriodMA= 55;
extern int METHOD_MA=MODE_SMA;
extern int X= 1;
extern int Limit=5440;
extern string    SoundFileName="alert.wav";
extern bool      ActiveSignal=true;
extern bool      ActiveAlert=true;

double maH[];
double maL[];
int i;
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0, maH[ i]);
   SetIndexStyle(1,DRAW_LINE);
   SetIndexBuffer(1, maL[ i ]);
   SetIndexLabel(0,"MA");
//----
   return(0);
  }
//+------------------------------------------------------------------+
int start()
  {
//--------------------------------------------------------------
   maL[ i]         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_LOW,  0);
   maH[ i]         = iMA(Symbol(), Period( ) , PeriodMA* X, 0, METHOD_MA, PRICE_HIGH, 0);
 //--------------------------------------------------------------
  if(Bid> maH[ i])
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   
   
   if(Bid< maL[ i])
   {
   Alert("eu Buy" );
   if( SoundFileName!="" )
         PlaySound( SoundFileName );} // Звуковой сигнал}
   //----
   return(0);
  }
//+------------------------------------------------------------------+

我认为它应该是,但它不是。
 

如何在主线和信号线 的反向交叉处正确编程出场? 因为信号出现的时间间隔很短......而订单在条件下没有在应该的地方关闭......。

这个问题已经困扰了我很久了!求你了!

这里是退出条件。

main_1=iCustom(NULL, 0, "i_Trend", 0, 0); // главная линия на 0м баре
main_2=iCustom(NULL, 0, "i_Trend", 0, 1); // главная линия на 1м баре
signal_1=iCustom(NULL, 0, "i_Trend", 1, 0); // сигнальная линия на 0м баре
signal_2=iCustom(NULL, 0, "i_Trend", 1, 1); // сигнальная линия на 1м баре
//----
   for(int i=0; i<OrdersTotal(); i++)
     {
      if(OrderSelect( i, SELECT_BY_POS, MODE_TRADES)==false)        break;
      if(OrderMagicNumber()!= MAGICMA || OrderSymbol()!=Symbol()) continue;
      //---- check order type 
      if(OrderType()==OP_BUY)
        {
         if( main_1< signal_1 && !( main_2< signal_2)) OrderClose(OrderTicket(),OrderLots(),Bid,3,White);
         break;
        }
      if(OrderType()==OP_SELL)
        {
         if( main_1> signal_1 && !( main_2> signal_2)) OrderClose(OrderTicket(),OrderLots(),Ask,3,White);
         break;
        }
原因: