Errors, bugs, questions - page 2340

 
fxsaber:

I haven't looked into it yet. The variant with the library should work - I'll write a library in the Expert Advisor I'm going to mess with, so there would be a panel for manual trading.


Is it possible to attach (run) an infinite trading script in MT4 visual mode parallel to a test EA?

scripts in visual testing mode can be thrown on the test chart, but it will not be able to trade

i also want to make a mischief )))). i have a f-function somewhere that gets the time in seconds to close the bar as a parameter and the result true/false if there are less seconds than in the parameter - i had a customer who wanted to remove limit orders that did not work xxx-seconds before the bar closes, in the all ticks mode it works like clockwork

so, you could add a lot of random actions to your test EA and at random moments of time: close one order, close all orders, open a new order.... If your code works with orders by MagikNumber, then it is not difficult to implement, instead of adding graphical elements

 
Igor Makanu:

scripts in visual testing mode can be thrown on the test chart, but it will not be able to trade

And on the whole according to your question: make a mess )))) i have a f-function somewhere that gets the time in seconds to close the bar as a parameter and the result is true/false if there are less seconds than in the parameter - i had a request to remove limit orders that did not work xxx-seconds before the bar closes, in the all ticks mode it works like clockwork

so, you could add a lot of random actions to your test EA and at random moments of time: close one order, close all orders, open a new order.... If your code works with orders by MagikNumber, then it is not difficult to implement it, instead of adding graphical elements

I need to debug every manual situation. That's why an automatic gadget won't do.


Figured out a good bibla for my purposes.

I've done it, I've found a good one. On the basis of good library (for the author - thank you, I won't comment his name just in case, because it's related to Market) for my aims I'll post a short cross-platform EA for manual trading

#property strict

class EAPADPRO
{
public:
  EAPADPRO()
  {
    EAPADPRO_LIBRARY_OnInit();
  }

  ~EAPADPRO()
  {
    EAPADPRO_LIBRARY_OnDeinit();
  }
};

void OnTick()
{
  static const EAPADPRO EAPadPro;

  EAPADPRO_LIBRARY_OnTick();
}

void OnTrade()
{
  EAPADPRO_LIBRARY_OnTrade();
}

void OnChartEvent( const int id, const long &lparam, const double &dparam, const string &sparam )
{
  EAPADPRO_LIBRARY_OnChartEvent(id, lparam, dparam, sparam);
}

#ifdef __MQL5__
  #import "Lib - EAPADPRO v23 LIBRARY.ex5" // https://www.expforex.com/_ld/2/210_EAPADPRO_LIBRAR.zip
#else // __MQL5__
  #define ORDER_FILLING_FOK 0

  #import "Lib - EAPADPRO v23 LIBRARY.ex4" // https://www.expforex.com/_ld/2/210_EAPADPRO_LIBRAR.zip
#endif // __MQL5__

void EAPADPRO_LIBRARY_OnInit( bool = true, int = 0, int = -1, string = NULL, bool = false, string = NULL, int = ORDER_FILLING_FOK, string = NULL,
                              string = NULL, string = NULL, string = NULL, string = NULL, string = NULL, string = NULL, string = NULL, bool = true );
void EAPADPRO_LIBRARY_OnDeinit( const int = 0 );
void EAPADPRO_LIBRARY_OnTick( bool = true );
void EAPADPRO_LIBRARY_OnTrade( bool = true );
void EAPADPRO_LIBRARY_OnChartEvent( const int, const long&, const double&, const string&, bool = true );
#import

The code should tell you how to connect it to your EA and start messing with it. It's a pity there's no pending order setting.

 
fxsaber:

It should be immediately clear from the code how to tap into your EA and start messing with it. It's a pity that there is no setting of pending orders.

I have sketched a variant for the delayed orders

 

If you click Download on the MT4 free Market product on the website, this appears

If I understand correctly, selecting the right button is another way to get mt4setup.

 
fxsaber:

If I understand correctly, selecting the right button is another way to get mt4setup.

https://download.mql5.com/cdn/web/metaquotes.software.corp/mt4/mt4setup.exe

installs a fiver. shh, no.

although maybe the parameters have an effect, but it's unlikely.

 

Compilation errors

class A {
             A() {}
    virtual ~A() {} //Error: 'a' - cannot access private member function
    static A a;
};
A A::a;             //Error: 'A::~A' - cannot access private member function
 

It would be good if in case of errors of separate passes it would be possible to understand, at what input parameters this pass was made.

Now in the build 1957 I have constantly part of passes during optimization ends with No memory error, the number of pass is indicated, but how to know what input data were used in this case? It seems that information about all passes is stored in a special file - how to get to it?

 

Error during compilation

#define  MACRO1\ //Error: '\' - unexpected in macro definition
        MACRO2

Otherwise:

#define  MACRO1 MACRO2\ //нормально
               MACRO3

It's fine. What difference does it make?

 
the stats for the market are down and all the ratings are off
 
TheXpert:
The stats for the market are down and all the ratings are off

The statistics and ratings have been restored.

Reason: