[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 890

 
artmedia70:
This is what?
What is this?

before the start is announced:

bool Buy = FALSE;
 
belck:

before the start is announced:

I can't understand, are you using your function to open pose or Kim's?
If it's Igor's, I roughly wrote an arbitrary call (not specific to your strategy), but if it's my own, there's not much information...
 

Hello, Could you please tell me how the construction is implemented in MQL4:

"If the closing price of the EURUSD minute bar at 17.17 is higher than the opening price of the EURUSD minute bar at 17.11, then".

The current time does not have to be 17.18, it can be later within a given day.

Maybe there is more than one way to do this??? (I'm just starting to learn the language)

 
Hi all, I can't figure it out:
//+------------------------------------------------------------------+
//|                                                     Proverka.mq4 |
//|                      Copyright © 2010, MetaQuotes Software Corp. |
//|                                        http://www.metaquotes.net |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"
int h;
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
 
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----

if (Bid==iMA(NULL,0,13,0,MODE_EMA,PRICE_CLOSE,0)) Alert("цена коснулась МА");

//----
   return(0);
  }
//+------------------------------------------------------------------+
When testing this prose code, a message never popped up in the log. What is the reason? The price for the month crosses EMA(13) many times hence the message should have appeared but it didn't(. Who can help!
 
a11adin:
Hi all, I can't figure it out: When testing this prose code, no message has ever popped up in the log. What is the reason? The price for the month crosses EMA(13) many times hence the message should have appeared but it didn't(. Who can help!

//+------------------------------------------------------------------+
//|                                                     proverka.mq4 |
//|                                Copyright © 2010, Victor Nicolaev |
//|                                                    vinin.ucoz.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Victor Nicolaev"
#property link      "vinin.ucoz.ru"

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1 Red

extern int MA_Period=13;
//---- buffers
double ExtMapBuffer1[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
   SetIndexStyle(0,DRAW_LINE);
   SetIndexBuffer(0,ExtMapBuffer1);
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
   int limit=Bars-counted_bars;
   if (limit>1) 
   {
      limit=Bars-MA_Period-1;
   }
   for (int i=limit;i>=0;i--) {
      ExtMapBuffer1[i]=iMA(NULL,0,MA_Period,0,MODE_EMA,PRICE_CLOSE,i);
      if (MathAbs(Close[i]-ExtMapBuffer1[i])<Point) Print("цена коснулась МА, Bar=", i);
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+
Look at this variant
 

Hello, could you please tell me in which cases a GetLastError() 4051 error occurs when setting a pending order. What can "Invalid value of function parameter" mean? Everything seems to be the same as always, but there is an error. Thank you!

Sorry. I found it myself.

 
Vinin:

Look at this option
Thank you, for your help. Much obliged=)
 

The logical operation || (FXI1<0 && FXI2>0 || RSI<50 && RSI>30) does not work. What is wrong? Thank you.

 
Maniac:

The logical operation || (FXI1<0 && FXI2>0 || RSI<50 && RSI>30) does not work. What is wrong? Thank you.

Have you tried paying her salary?
 
vasya_vasya:
Have you tried paying her a salary?


There is an established procedure for logging operations depending on the type.

If I understand correctly what you are interested in, try it.

if ((FXI1<0 && FXI2> 0) || (RSI<50 && RSI> 30))
   {
   }

The sequence of logging operations is described in the documentation and tutorial.