Questions from Beginners MQL5 MT5 MetaTrader 5 - page 380

 
Artyom Trishkin:

Highlight Signal_ThresholdOpen in the code and press Crrl+F to search for all occurrences of this variable in the code and see what calculations this variable is involved in. Similarly, search for ThresholdClose.

See if you can figure it out ;))

Thank you)))) I tried and tried, but so far without success))))) I decided to ask here, maybe someone knows for sure)))

Left it as variable "X" for now - affects something there)))).

Maybe later I'll figure out what it's for as I go along)))

 
kashi_ann:

Thank you)))) I tried and tried)))) so far without success)))) decided to ask here, maybe someone knows for sure))))

Left it as an "X" variable for now - affects something there)))).

Maybe later I'll figure out what it's for as I go along)))

The principles of voting and weights of signals: MQL5 Wizard: New version.
 

Googling can't find... "trade class c trade download site:mql5.com"

Give me a link where to download c-trade class inclusion file

CTrade class.

Thank you.

Otherwise the line doesn't compile#include<Trade\Trade.mqh>.


 
Roman Shiredchenko:

Googling can't find... "trade class c trade download site:mql5.com"

Give me a link where to download inlude trade class file

CTrade class.

Thank you.

Otherwise the line doesn't compile#include<Trade\Trade.mqh>


Is in 5, not seen in 4

https://www.mql5.com/ru/docs/standardlibrary/tradeclasses/ctrade

for 4kaTrade.mqh but it's not a class

//--------------------------------------------------------------------
// Trade.mqh
// Предназначен для использования в качестве примера в учебнике MQL4.
//--------------------------------------------------------------------
// Торговая функция.
//--------------------------------------------------------------- 1 --
int Trade(int Trad_Oper)              // Пользовательская функция
  {
   // Trad_Oper - тип торговой операции:
   // 10 - открытие Buy  
   // 20 - открытие Sell 
   // 11 - закрытие Buy
   // 21 - закрытие Sell
   //  0 - значимых критериев нет
   // -1 - используется другой финансовый инструмент
   switch(Trad_Oper)
     {
      //--------------------------------------------------------- 2 --
      case 10:                         // Торговый критерий = Buy
         Close_All(1);                 // Закрыть все Sell
         if (Lot()==false)             // Средств не хватает на миним.
            return;                    // Выход из пользов. функции
         Open_Ord(0);                  // Открыть Buy
         return;                       // Поторговали - уходим
         //------------------------------------------------------ 3 --
      case 11:                         // Торг. крит. = закрытие Buy
         Close_All(0);                 // Закрыть все Buy
         return;                       // Поторговали - уходим
         //------------------------------------------------------ 4 --
      case 20:                         // Торговый критерий = Sell
         Close_All(0);                 // Закрыть все Buy
         if (Lot()==false)
            return;                    // Выход из пользов. функции
         Open_Ord(1);                  // Открыть Sell            
         return;                       // Поторговали - уходим
         //------------------------------------------------------ 5 --
      case 21:                         // Торг. крит. = закрытие Sell
         Close_All(1);                 // Закрыть все Sell
         return;                       // Поторговали - уходим
         //------------------------------------------------------ 6 --
      case 0:                          // Удержание открытых позиций
         Tral_Stop(0);                 // Трейлинг стоп Buy
         Tral_Stop(1);                 // Трейлинг стоп Sell
         return;                       // Поторговали - уходим
         //------------------------------------------------------ 7 --
     }
  }
//--------------------------------------------------------------- 8 --
Документация по MQL5: Стандартная библиотека / Торговые классы / CTrade
Документация по MQL5: Стандартная библиотека / Торговые классы / CTrade
  • www.mql5.com
Стандартная библиотека / Торговые классы / CTrade - справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
pako:

5 has it in 5, I haven't seen it in 4

https://www.mql5.com/ru/docs/standardlibrary/tradeclasses/ctrade

for4trade.mqh but it's not a class

and HAVE to be on 5 - then what - rocking how?

Here - details...

https://www.mql5.com/ru/forum/60605/page2

Trade class - found - but the problem of compiling this robot persists...

I would be grateful for help...

Советники: Well Martin
Советники: Well Martin
  • www.mql5.com
Советник Well Martin на основе двух индикаторов: Bollinger Bands и ADX. - Страница 2 - Категория: статьи и техническая библиотека по автоматическому трейдингу
Files:
wellmartin.mq5  12 kb
 

Who can explain the fundamental difference

between

GetBidLow=(SymbolInfoDouble(sym,SYMBOL_BIDLOW));

и

SymbolInfoDouble(sym,SYMBOL_BIDLOW,GetBidLow);

I was looking through the native classes in the terminal and there is half written this way and the other half differently, but what is the fundamental difference I have not understood ...

Who knows?

 
Vladimir Pastushak:

Who can explain the fundamental difference

between

и

I was looking through the native classes in the terminal and there is half written this way and the other half differently, but what is the fundamental difference I have not understood ...

Who knows?

In the first case, you analyze a variable that stores the result of a function. In the second case, you can additionally check the error returned by the function.
 
Karputov Vladimir:
In the first case, you analyse the variable in which the result of the function is placed. In the second case, you can additionally check the error returned by the function.
So, in fact, the second option is better?
 
Roman Shiredchenko:

and HAVE TO HAVE A FIVE - what's next - rocking how?

Here - details...

https://www.mql5.com/ru/forum/60605/page2

Trade class - found - but the problem of compiling this robot persists...

I would be grateful for help...

why download it? it's in 5

if you don't have it, it's in the trailer from 5, but it won't work on 4 - for obvious reasons

it compiles fine on 5

Files:
Trade.zip  25 kb
 
pako:

why download it? it is available in 5

if you don't have it, it's in the trailer from 5, but it won't work on 4 - for obvious reasons

it compiles fine in 5.

Yes. Thank you. Got it. Got it. I compiled it in 4 because of a bit of fuss... :-)

So many terminals. Got a bit confused... :-)

Reason: