Errors, bugs, questions - page 67

 
gumgum:
I want to choose whether to install the x64 or x32 bit version of the terminal.
As I understand it, you can download the regular 32 bit version and install it on a computer with 64 bit...
 
Interesting:
As I understand it, it is possible to download the usual 32 bit version and put it on a computer with 64 bits...

downloading here https://download.mql5.com/cdn/web/metaquotes/mt5/mt5setup.exe automatically installs x64.

So, if 64 bit OS, please select x64 or x86.

 
gumgum:

downloading here https://download.mql5.com/cdn/web/metaquotes/mt5/mt5setup.exe automatically installs x64.

So, if 64 bit OS, please select x64 or x86.

Then at the moment it's easiest to use builds less than 292 (already have 64 bit support there).

Although if you think about it, terminal bitrate selection is necessary and desirable for 64 bit PCs.

 
Developers - please deal with terminal messages "Error modifying position by....''. They keep popping up when running MACD Sample on tester or demo...
 
Interesting:
Please, help the developers to understand the error message "Error modifying position by....''. They keep coming up when running MACD Sample in tester or demo...
"

This is an inherited error from MACD Sample mql4 : )

An attempt to modify an order without changing the stop loss.

There are incorrectly compared doubles in the code.

 
Swan:

This is an inherited error from MACD Sample mql4 : )

An attempt to modify an order without changing the stop loss.

The code incorrectly compares doubles.

Well, the errors should be corrected. Or what?
 
Interesting:
Well, mistakes have to be corrected. Or what?

It's a "vintage expert" :)

You can fix it like that:

//+------------------------------------------------------------------+
//| Check for long position modifying                                |
//+------------------------------------------------------------------+
bool CSampleExpert::LongModified()
  {
   bool res=false;
//--- check for trailing stop
   if(InpTrailingStop>0)
     {
      if(m_symbol.Bid()-m_position.PriceOpen()-m_adjusted_point*InpTrailingStop>0.1*_Point)
        {
         if(m_symbol.Bid()-m_traling_stop-m_position.StopLoss()>0.1*_Point || m_position.StopLoss()==0.0)
           {
            double sl=m_symbol.Bid()-m_traling_stop;
            double tp=m_position.TakeProfit();
            //--- modify position
            if(m_trade.PositionModify(Symbol(),sl,tp))
               printf("Long position by %s to be modified",Symbol());
            else
              {
               printf("Error modifying position by %s : '%s'",Symbol(),m_trade.ResultComment());
               printf("Modify parameters : SL=%f,TP=%f",sl,tp);
              }
            //--- modified and must exit from expert
            res=true;
           }
        }
     }
//---
   return(res);
  }
//+------------------------------------------------------------------+
//| Check for short position modifying                               |
//+------------------------------------------------------------------+
bool CSampleExpert::ShortModified()
  {
   bool   res=false;
//--- check for trailing stop
   if(InpTrailingStop>0)
     {
      if(m_position.PriceOpen()-m_symbol.Ask()-m_adjusted_point*InpTrailingStop>0.1*_Point)
        {
         if(m_position.StopLoss()-m_symbol.Ask()-m_traling_stop>0.1*_Point || m_position.StopLoss()==0.0)
           {
            double sl=m_symbol.Ask()+m_traling_stop;
            double tp=m_position.TakeProfit();
            //--- modify position
            if(m_trade.PositionModify(Symbol(),sl,tp))
               printf("Short position by %s to be modified",Symbol());
            else
              {
               printf("Error modifying position by %s : '%s'",Symbol(),m_trade.ResultComment());
               printf("Modify parameters : SL=%f,TP=%f",sl,tp);
              }
            //--- modified and must exit from expert
            res=true;
           }
        }
     }
//---
   return(res);
  }
 
Developers - Where is the description of the changes in the 298 release?
 
Swan:

It's a "vintage expert" :)

You can fix it like that:

I wish the developers would fix their EA release so that everything would be OK...
 
Hello, could you please tell me if I have understood correctly that CFD instruments have a restriction, i.e. the orders type is intraday excluding SL and TP. I.e. if this is correct, what function should be used to detect SL, TP that they should not be placed. Thank you
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5