Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1329

 
Dear programmers, please advise how to get the correct swap amount in points, i.e. PositionGetDouble(POSITION_SWAP) outputs money, this amount is divided by point value, right? how to get point value then, what to divide by? totally confused, please advise.
 
VVT:
Dear programmers, please advise how to get the correct swap amount in pips, i.e. PositionGetDouble(POSITION_SWAP) outputs money, we divide this amount by point value, right? how to get the point value, divide by what? I'm confused, please advise.

SYMBOL_TRADE_TICK_VALUE_PROFIT

Calculated tick value for profitable position

double

SYMBOL_TRADE_TICK_VALUE_LOSS

Calculated tick value for a losing position

double

 

How can you get one?

#property copyright "Copyright 2021"
#property link "https://www.mql5.com"
#property version "1.12"

int OnInit()
{
  Print(version); 'version' - undeclared identifier
  return(INIT_SUCCEEDED);
}
 
Vitaly Muzichenko:

How can you get one?

#define  VER "1.02"
#property version VER
 
void OnStart()
{
   Comment("Версия программы: ",VER); 
}
 
Спартак Угланов:

It is, but I'd like to get rid of #define

 
Vitaly Muzichenko:

It is, but I'd like to get rid of #define

I don't think so
question to mql authors, most likely to equate properties with declarations (in a specific variant, not necessarily globally)
 
Alexey Viktorov:

SYMBOL_TRADE_TICK_VALUE_PROFIT

Calculated tick value for profitable position

double

SYMBOL_TRADE_TICK_VALUE_LOSS

Calculated value of a tick for a losing position

double

Eh, thanks, I don't understand anything yet, Friday, tomorrow with a clear head)

 
Alexey Viktorov:

Ctrl+F

But only when testing with visualisation.

Thank you Friends!

 
Do I even need this feature if I am trading futures AMP broker?
int  digits_adjust=1;
   if(m_symbol.Digits()==3 || m_symbol.Digits()==5)
      digits_adjust=10;
    
    


If I leave this feature, I need to set the trap and slope to 5000 to get 50



 

Afternoon.

How can MQL4(5) code remove limitation on maximum(minimum) of indicator window, which is set as follows:

IndicatorSetDouble(INDICATOR_MAXIMUM,  X);
IndicatorSetDouble(INDICATOR_MINIMUM, -X);

?