Indicators: i-OrdersMQL5 - page 2

 
-Aleks-:

The indicator is interesting, but it would be more convenient for me if it would draw lines like MT4 - on deals - from opening to closing. If in the current version, it lacks displaying the position price - it is from it that the vector to the closing point should be drawn.

Convert a similar MT4 indicator to MT5, using the MT4 display of MT5-history orders.

 
fxsaber:

Convert a similar MT4 indicator to MT5 using MT4 order display MT5 history.

I don't know how to do that :(

Here is an indicator that I use in MT4 to analyse - how do I convert it?

Files:
 
-Aleks-:

Here is an indicator that I use in MT4 to analyse - how do I convert it?

First, insert this

#include <MT4Orders.mqh>
//#include <MQL4_to_MQL5.mqh> // here to look up MarketInfo, etc.
#include <Ind4To5.mqh> // https://www.mql5.com/en/blogs/post/681230

and then tweak the remaining errors.

 
fxsaber:

First put this in

and then tweak the remaining errors.

There are 6 errors left, can you help me fix them?
Files:
 
Aleksey Vyazmikin:

There are 6 errors left, can you help me fix them?
bool RefreshRates(void) { return(true); }

double MarketInfo( const string Symb, const ENUM_SYMBOL_INFO_DOUBLE Property )
{
  return(::SymbolInfoDouble(Symb, Property));
}

int MarketInfo( const string Symb, const ENUM_SYMBOL_INFO_INTEGER Property )
{
  return((int)::SymbolInfoInteger(Symb, Property));
}

#define MODE_SPREAD SYMBOL_SPREAD
#define MODE_TICKVALUE SYMBOL_TRADE_TICK_VALUE

#include "VisualOrders.mq5" // https://www.mql5.com/ru/forum/2382/page2#comment_5433109
 
fxsaber:

I've done everything, but it doesn't work properly... and in general, the terminal decided that this is an Expert Advisor, but this is an indicator in MT4.
Files:
 
Aleksey Vyazmikin:

I've done everything, but it doesn't work correctly... And in general, the terminal decided that this is an Expert Advisor, and this is an indicator in MT4.

So they wrote OnTick instead of OnCalculate for some reason.

 
fxsaber:

So they wrote OnTick instead of OnCalculate for some reason.

Because I am not literate :) I'm still having trouble with MT5.
 

Would you be kind enough to resuscitate it to working condition - please!

 
Aleksey Vyazmikin:

Would you be kind enough to resuscitate it to working condition - please!

Unfortunately, it's a bit too much, because you have to actually understand what the author of the original indicator wants in each line.

The compilation works fine, now it's your turn to figure it out.