Questions from a "dummy" - page 223

 
lazarev-d-m: Please help, send me an example of work withORDER_TIME_SPECIFIED, I can't make the expiry time of an order properly

And in simple terms, describe the meaning of these transformations:

string need_year2_AUDUSD=IntegerToString(need_year_AUDUSD,0,' ');
string need_mon2_AUDUSD=IntegerToString(need_mon_AUDUSD,0,' ');
string need_day2_AUDUSD=IntegerToString(need_day_AUDUSD,0,' ');
string need_hour2_AUDUSD=IntegerToString(need_hour_AUDUSD,0,' ');
string need_min2_AUDUSD=IntegerToString(need_min_AUDUSD,0,' ');
string need_sec2_AUDUSD=IntegerToString(need_sec_AUDUSD,0,' ');
string date_AUDUSD=(need_year2_AUDUSD+".0"+need_mon2_AUDUSD+".0"+need_day2_AUDUSD+" "+need_hour2_AUDUSD+":"+need_min2_AUDUSD+":"+need_sec2_AUDUSD);
datetime b_AUDUSD=StringToTime(date_AUDUSD);
 

the goal is to find an expiry time, found already on the forum, someone used this

requiest something-something = TimeTradeServer()+60;

It seems to work, but the point of the problem is that I complained about wrong expiration time and something went wrong, probably I'm looking for the wrong reason at all

The idea is this, I want to test the behavior of the EA on December 18 at 16 o'clock, great news comes out, which gives a good momentum, with almost no pullback, but when I try to check the behavior of the EA on this momentum, there is a problem that the stop orders are ignored, I've never faced with this before, I thought I was overloading the system with calculations, made it primitive to impossible, here is the actual code

#include <Trade\Trade.mqh> 
CTrade trade;
MqlDateTime mqldt;
bool Trading;
input string qwerty="EURUSD";
input double D=0.0005;
input double SL=0.003;
input double TP=0.003;
input int min=30;
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {EventSetTimer(10);return(0);}
void OnDeinit(const int reason)
  {EventKillTimer();}
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTimer()
  {
   TimeCurrent(mqldt);
   datetime b=TimeTradeServer()+60*min;
   if (mqldt.day==18&&mqldt.hour==16)
    {
    Trading=true;
    }else{
    Trading=false;
    }
   if(!PositionSelect(qwerty) && Trading && OrderGetTicket(0)==0)//Открываем если нет позиций, нет ордеров и сейчас нужное время
     {
      trade.BuyStop(0.1,SymbolInfoDouble(qwerty,SYMBOL_ASK)+D,qwerty,SymbolInfoDouble(qwerty,SYMBOL_ASK)+D-SL,SymbolInfoDouble(qwerty,SYMBOL_ASK)+D+TP,ORDER_TIME_SPECIFIED,b);
      trade.SellStop(0.1,SymbolInfoDouble(qwerty,SYMBOL_BID)-D,qwerty,SymbolInfoDouble(qwerty,SYMBOL_BID)+D+SL,SymbolInfoDouble(qwerty,SYMBOL_BID)-D-TP,ORDER_TIME_SPECIFIED,b);
     }
  }
Документация по MQL5: Дата и время / TimeTradeServer
Документация по MQL5: Дата и время / TimeTradeServer
  • www.mql5.com
Дата и время / TimeTradeServer - Документация по MQL5
 
lazarev-d-m:

Well, the

datetime b=TimeTradeServer()+60*min;

suddenly quickly sorted out :) For the rest, here's a note. This line here.

if (mqldt.day==18&&mqldt.hour==16)
will be triggered for a full hour, from 4:00 p.m. to 4:59 p.m. Does this correspond to your trading algorithm?
 
Yedelkin:

Well, the

suddenly quickly sorted out :) For the rest, here's a note. This line here

will be triggered for a full hour, from 16-00 to 16-59. Is this consistent with your trading algorithm?

I don't care about it yet, I have slippage and no Buy or Sell, is it possible with pendants?
 
lazarev-d-m:
I don't care about it yet, I have slippage and no Buy or Sell open, is that possible with pendants?

How did you come to the conclusion that slippage was occurring? What entries in the logbook? Are orders being placed? If so, what happens next? If not, in what mode of testing ( Open prices only, OHLC on M1, All ticks)? Have you looked in visualization mode?

In general, you need more information to answer this question. )) So far, the assumption is that the test is conducted in the open prices only mode. Try it on OHLC on M1.

Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы
Документация по MQL5: Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы
  • www.mql5.com
Стандартные константы, перечисления и структуры / Константы индикаторов / Ценовые константы - Документация по MQL5
 
I am a beginner, explain in detail how signals work, here is my Skype (shyt.korol).
 
Shyt1990:
I am a newbie, can you explain in details how signals work, here is my Skype (shyt.korol), I will share profits with you.

Have a look at these articles:

Benefits of MQL5 Signals

How to subscribe to Trading Signals

How to become a Signals Provider for MetaTrader 4 and MetaTrader 5

//---

You can ask additional questions right on the forum, for free. For example, open this thread: Suggestions, remarks and errors for the "Signals" service. Or you can create your own.

 
Can you give me an answer? Will I get the money from the signals I signed up for in a month?
 
Shyt1990:
Can you give me an answer? Will I get money from the signals I have subscribed to in a month?
If you connect your real account to the Signals Provider, all operations will be reflected on your deposit in real time. Please read the rules carefully: Rules for the "Signals" service.
 
Where can I see this deposit?