Questions from Beginners MQL4 MT4 MetaTrader 4 - page 156

 
Mikhail.Fx:

Greetings all !

Decided to run the old EA for the sake of experimentation, but at the time of compilation gives a bunch of errors (compile). I've been in a different build for a while now. Any suggestion on what the issue is and how to fix it.https://www.mql5.com/ru/code/9386

p.s. Maybe someone has an old build of the terminal... it would be more vicious...

Did you plug in the"Fann2MQL.mqh" library, did you do everything properly?

 

That's right, resolved the DLL, EA doesn't start in the tester. The compiler gives out:

can't open "C:\Users\дом\AppData\Roaming\MetaQuotes\Terminal\50 CA3DFB510CC5A8F28B48D1BF2A5702\MQL4\include\Fann2MQL.mqh" include file   88.mq4  12      11
'f2M_parallel_init' - function not defined      88.mq4  227     5
return value of 'OrderSelect' should be checked 88.mq4  287     7
return value of 'OrderSelect' should be checked 88.mq4  297     10
'f2M_parallel_deinit' - function not defined    88.mq4  245     5
'f2M_create_from_file' - function not defined   88.mq4  72      11
'f2M_create_standard' - function not defined    88.mq4  79      12
'FANN_SIGMOID_SYMMETRIC_STEPWISE' - undeclared identifier       88.mq4  80      40
'f2M_set_act_function_hidden' - function not defined    88.mq4  80      6
'f2M_set_act_function_output' - function not defined    88.mq4  81      6
'f2M_randomize_weights' - function not defined  88.mq4  82      6
'void' function returns a value 88.mq4  96      7
'f2M_save' - function not defined       88.mq4  99      10
'f2M_destroy' - function not defined    88.mq4  105     11
'f2M_run' - function not defined        88.mq4  114     11
'FANN_DOUBLE_ERROR' - undeclared identifier     88.mq4  117     14
'f2M_get_output' - function not defined 88.mq4  119     11
'f2M_run_parallel' - function not defined       88.mq4  127     11
'f2M_get_output' - function not defined 88.mq4  163     21
'f2M_train' - function not defined      88.mq4  171     9
 
Citizens! Does anyone have a ready-made piece of TRAILING that follows the price???
 
extern bool    Tralingbuy           = false;        //разрешить трейлингстоп buy 
extern bool    Tralingsell          = false;        //разрешить трейлингстоп Sell
extern int     TralingStopbuy       = 90;
extern int     TralingStopsell      = 90;
extern int     TralingStepbuy       = 5;
extern int     TralingStepsell      = 5;
extern int     magic                = 0;
//--------------------------------------------------------------------
void Tralorder()
  {
   double sl=0,op=0,ask=NormalizeDouble(Ask,_Digits),bid=NormalizeDouble(Bid,_Digits);

   for(int i=OrdersTotal()-1; i>=0; i--)
     {
      if(OrderSelect(i,SELECT_BY_POS)==true)
        {
         if(OrderSymbol()==Symbol())
           {
            if(OrderMagicNumber()==magic)
              {
               op=NormalizeDouble(OrderOpenPrice(),_Digits);
               sl=NormalizeDouble(OrderStopLoss(),_Digits);

               if(OrderType()==OP_BUY)
                 {
                  if(Tralingbuy==true)
                    {
                     double tstopb=NormalizeDouble(TralingStopbuy*Point(),_Digits);
                     double tstepb=NormalizeDouble(TralingStepbuy*Point(),_Digits);
                     if((bid-op)>tstopb+tstepb)
                        if((bid-sl)>tstopb+tstepb)
                           if(OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble((bid-tstopb)-Point,_Digits),0,0,clrGreen)==false)
                              Print(GetLastError());

                    }
                 }
               if(OrderType()==OP_SELL)
                 {
                  if(Tralingsell==true)
                    {
                     double tstops=NormalizeDouble(TralingStopsell*Point(),_Digits);
                     double tsteps=NormalizeDouble(TralingStepsell*Point(),_Digits);
                     if((op-ask)>tstops+tsteps)
                        if((sl-ask)>tstops+tsteps || sl==0)
                           if(OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble((ask+tstops)+Point,_Digits),0,0,clrRed)==false)
                              Print(GetLastError());

                    }
                 }
              }
           }
        }
     }
  }
 

Fann2MQL with documentation in Russian

Files:
Fann2MQL.mqh  44 kb
 

Guys, it's on fire!!!!

This is some kind of masturbation at all..... Pardon the epithets ...............

The situation is that on my Alpari broker opens with a dynamic lot of 0.01

And my friend from india opens with 0.1 lot minimum!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Whatever you do, at the same time my friend can manually open 0.01 lot.............

What a collapse. Am I a moron?

 
eflaer:

Guys, it's on fire!!!!

...

Say I'm a retard?

Breathe in, breathe out, and describe the situation normally. Because there's nothing but emotion and no specifics, apart from the quoted one, of course...

Let your comrade from India try to open a position with 0.01 lot by script

 
Artyom Trishkin:

Breathe in, breathe out, and describe the situation normally. Because only emotions and zero specifics, apart from the quoted one, of course...

Let your comrade from India try a script to open a position with 0.01 lot

on A... i.e. everybodyshare is tied to minimum margin requirements and the current spread is taken into account so they cannot open an order for the "whole cutlet" ... If you are looking for a MetaTrader 4 order, you may enter it in the same way as in MT4.

I've found it on the forums:

As I wrote above A... As I wrote above, about half a year ago they introduced an innovation in lot calculation and now they need to take into account the value of the spread in addition to the margin. In this case with 0.49 lot margin = 56.43 USD + spread = 4.90 USD, to open transaction with such a lot you need to have on your balance at least 61.33 USD. In my case with balance 56.36 USD it is possible to open position with maximum lot 0.45 because margin = 51.83 USD + spread = 4.50 USD and total amount will be 56.33 USD, what is less than my balance of 56.36 USD.

I.e. you have to top up your balance first or not to open an order for the whole deposit and then contact Indian traders ;)

PS: margin requirements depend on the amount of leverage

 

Can you please tell me why the Equity indicator is not showing. The window is blank. Changed all the parameters of the indicator, it still does not show

Files:
 
How to prescribe Kijun calculation without using iHighest,iLowest
Reason: