Libraries: Virtual - page 7

 
EgorKim #:

is there any possibility to transfer mt5 EA to virtual trading environment ?

Rewrite the order system in MT4-style. Then it will automatically work in Virtual.

This is an indicator Expert Advisor. It will work in Virtual only in MT5-Tester and real-time.

 
fxsaber #:
Rewrite the order system in MT4-style. Then it will automatically work in Virtual.

That's the problem.

When you write on mt5 and study and rewrite EA in mt4 it is not very good.

Do you plan to add to the functionality and support for mt5 EAs?

fxsaber #:
This is an indicator EA. It will work in Virtual only in MT5-Tester and real-time.

Real-time with your library ? I.e. it will be possible to trade virtually on custom symbol as in tester ?

 
EgorKim #:

When you write on mt5 and study and rewrite the EA in mt4 as it is not very good.

I don't know why they write for MT5 via Trade.mqh and don't study the issue of alternatives.

You do not plan to add to the functionality and support of only mt5 EAs ?

No. I don't write what I won't use.

Real-time with your library ? I.e. it will be possible to trade virtually on a custom symbol like in the tester ?

In kodobaza posted Tester, which trades on a custom symbol, can go back in time and real-time change ticks as desired.

 
fxsaber #:
In kodobase posted a Tester that trades on a custom symbol, can go back in time and real-time change ticks as it pleases.
Connected MT4-style Expert Advisor

Same problem again (

 
I hope the files in the compressed package can be updated.
 
void OnTickMulti( const string &Symb, const int &Index ) {
    _VSP(virtualEnvAry[Index]); // Choose a virtual trading environment
    MqlTick ticks[1];
    if (SymbolInfoTick(Symb, ticks[0])) break;
    VIRTUAL::NewTickMulti(ticks, hedge.MyOnTick);
}

// void Hedge::MyOnTick(const string &Symb_, const int &Index_)

May I ask the author why it cannot be compiled here?

error: pointer to this function type is not supported yet

 
void OnTickMulti( const string &Symb, const int &Index ) {
    _VSP(virtualEnvAry[Index]); // Choose a virtual trading environment
    MqlTick ticks[1];
    if (SymbolInfoTick(Symb, ticks[0])) break;
    VIRTUAL::NewTickMulti(ticks);
    hedge.MyOnTick(Symb, index);
}

Should it be used this way?

 
hini #:

Thread.

Библиотеки: Virtual
Библиотеки: Virtual
  • 2024.06.26
  • fxsaber
  • www.mql5.com
Статьи и техническая библиотека по автоматическому трейдингу: Библиотеки: Virtual
 
I am experimenting with custom symbol BTCUSD. It has tick price = 0.1
Virtual tester shows profit in the deposit currency an order of magnitude more than MQ tester.
This modification in Order.mqh helped:
.
  bool Create( const SYMBOL_BASE &SymbolBase, const ENUM_ORDER_TYPE inType, const double &dLots,
               double inPrice, int SlipPage,  double dSL, double dTP, const MAGIC_TYPE &iMagicNumber,
               const string &sComment, const datetime &dExpiration, const MqlTick &Tick, double &STOPS_LEVEL, int &TRADE_EXEMODE )
  {
    this = SymbolBase;
    double TICK_SIZE=SymbolInfoDouble(this.GetSymbol(),SYMBOL_TRADE_TICK_VALUE);
    this.TickValue *= (this.Lots = ::NormalizeDouble(dLots, 8)) * TICK_SIZE;
Well, by default you have calculations in pips, not in currency, so it is probably not relevant. Everything matches in pips.