Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 532

 

Hello all.

I trade some pairs manually (20pc), I don't sit at my PC all the time, when I come back I see that some pairs closed on pips and loss, I go to history, see what pairs closed and set them again.

I want to get rid of such a small cumbersome task like climbing in the history, etc. I want my Expert Advisor to show me in any window what closed at what time and by loss or ten lots and it would be nice to have a signal at closing.

Is there something like this ? Please advise.

One more question. I noticed that the price sometimes crosses TP and a deal is not closed (sometimes it is closed several times), I would call brokerage company and make a scandal, but I cannot always control it. Please advise, i bet there is something ?

 
And then you will make more scandals and you will be told that your EA is lying outrageously and you should contact the developer of the EA or indicator, depending on how you want to write it.
 
sashalambin1:

Hello all.

I trade some pairs manually (20pc), I don't sit at my PC all the time, when I come back I see that some pairs closed on pips and loss, I go to history, see what pairs closed and set them again.

I want to get rid of such a small cumbersome task like climbing in the history, etc. I want my Expert Advisor to show me in any window what closed at what time and by loss or ten lots and it would be nice to have a signal at closing.

Is there something like this ? Please advise.

One more question. I noticed that the price sometimes crosses TP and a deal is not closed (sometimes it is closed several times), I would call brokerage company and make a scandal, but I cannot always control it. Please advise, i bet there is something ?


All this is easily made to order in the department Work. And if you look around the kodobase, you can find something similar and build yourself whatever you need, but it often needs a fine-tuning with a file.
 
Please advise what is the new structure of the .hst history files, before the file started with 149 bytes, then the data started with 44 each bar. The proprietary software used to read the data from the file without any problems. After the last metatrader update, it stopped reading. The problem is exactly in the file structure, because the old files open normally.
 
galabut:
Can you tell me what is the new structure of .hst history files, before the file started with 149 bytes, then the data started with 44 each bar. Previously the proprietary software read the data from the file without any problems. After the last metatrader update, it stopped reading. The problem is exactly in the file structure, because the old files open normally.

There's one about this

 
r772ra:



Thank you! It worked, I was happy as a child, however the EA stopped displaying "new knees to buy". This function comes right after what I changed in the code. Can you tell me where I went wrong?

By the way, "new sell knees" are placed without errors, according to the algorithm.

extern string s13                = ">>>>>>>>>>>>>>>>>>>>>>>>>>>>";
extern string s14                = ">>> Время работы";
extern int    StartHour          = 21;      // Время закрытия, часы
extern int    StartMinute        = 30;      // Время закрытия, минуты
extern int    CloseHour          = 01;      // Время закрытия, часы
extern int    CloseMinute        = 0;      // Время закрытия, минуты

//===================================================================================================================================================
int i = 0;
int TimePrev = 0;
int vDigits;
int OrderSended = 0;
int TotalBuyOrders = 0, TotalSellOrders = 0;
int Lpos, Lpos1, Cpos;

double Spread;
double mPipStep;
double vPoint;
double PriceTarget, AveragePrice, LastBuyPrice, LastSellPrice;
double BuySummLot,SellSummLot,TotalProfitBuy,TotalProfitSell;
double BLot, SLot;
double Cprofit, Lprofit, Lprofit1, PrcCL;

string LastOrderComment = "";
string BComment, SComment;

//===================================================================================================================================================
//===================================================================================================================================================
//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+
int OnInit()
  {
//---
  vPoint  = Point;
  vDigits = Digits;
  TimePrev = Time[0];
  Spread = NormalizeDouble(MarketInfo(Symbol(), MODE_SPREAD),vDigits)*vPoint;
  
  //перевод на 5-ти знак-
  int DcD = 1;
  if((vDigits == 5)||(vDigits == 3)) DcD = 10;   
  PipStep           *= DcD;
  StaticTakeProfit  *= DcD;
  StopLoss          *= DcD;
  iMA_OpenDistance  *= DcD;
  
  if(OnScreenInfo) DrawInfo();
  
//---
   return(INIT_SUCCEEDED);
  }

//===================================================================================================================================================
//===================================================================================================================================================
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
  ObjectDelete("CurrTime");
  ObjectDelete("BuyZeroLevel");
  ObjectDelete("BuyAveragePrice");
  ObjectDelete("SellZeroLevel");
  ObjectDelete("SellAveragePrice");

  return(0);
}

//===================================================================================================================================================
//===================================================================================================================================================
//+------------------------------------------------------------------+
//| Expert tick function                                             |
//+------------------------------------------------------------------+
void OnTick()
  {
   if(!isTradeTimeInt(StartHour,StartMinute,CloseHour,CloseMinute)) return;

   //Здесь то,,,,
  if(!isTradeTimeInt(00, 00, 00, 00))
  
  //часы
  if(ShowClock) ShowCurrentTime();

  //инфо
  if(OnScreenInfo) DrawInfo();

  if(OnScreenInfo) SetOrdersInfo();

  //проверка нового бара
  if(TimePrev == Time[0] && CheckNewBar == true) return(0);   

  CheckOverlapping();  

  //-------------------------------------------------------------------------------------------------------------------------------------------------
  //новые колени на покупку...
  TotalBuyOrders = CountOfOrders(MagicNumberBuy);
  if(TotalBuyOrders > 0 && TotalBuyOrders < MaxTrades)
  {
    OrderSended = -1;
    LastBuyPrice = FindLastOrderParameter(MagicNumberBuy, "price");

    if(LastBuyPrice - Ask >= GetPipstepForStep(TotalBuyOrders + 1) * vPoint)
    {
      BLot   = GetLotForStep(MagicNumberBuy, TotalBuyOrders);
      BComment = StringSubstr(LastOrderComment, 0, StringFind(LastOrderComment, "|", 0)) + "|";
      OrderSended = SendMarketOrder(OP_BUY, BLot, 0, 0, MagicNumberBuy, BComment);
    }
  }
  
  
  //-------------------------------------------------------------------------------------------------------------------------------------------------
  //новые колени на продажу...
 

Good afternoon dear friends.

Can you tell me how to programmatically put a muving on an atr.

 
Stells:

Good afternoon dear friends.

Can you tell me how to programmatically put a muving on an atr.


Use this https://docs.mql4.com/ru/indicators/imaonarray
 

How can determine that a graphical object with a specific name is already on the graph?

LabelCreate(0,InpName,0,InpX,InpY,CORNER_LEFT_UPPER,"EXPERT STOPED !!!", InpFont,InpFontSize,
InpColor,InpAngle,ANCHOR_CENTER,InpBack,InpSelection,InpHidden);
 
abeiks:

How can determine that a graphical object with a specific name is already on the graph?


ObjectFind(0, "EXPERT STOPED !!!");
Reason: