Discussion of article "An attempt at developing an EA constructor" - page 3

 
The article is good, high quality. Thank you, it makes it much easier to understand how to build an EA.
 
vjqgfhjkm #:
The article is good, high quality. Thank you, it makes it much easier to understand how to build an EA.

I see. I was just confused by the name of the signals. In general, if you are interested in the article - ask questions, share your code.

 

Hello!


Can you tell me how to use your constructor to set stop and take not in fix points, but in the price I need? And also from the article it is not very clear how to place a pending order (for example, limit order ) at the price I need. Where exactly is the price set?

 
Viktor Kudriavtsev pending order (for example, a limit order ) at the price I need. Where exactly is the price set?

At the end of the signals block there are commented lines for working with pending orders:

//---
   /*if(InpPendingOnlyOne)
 if(IsPendingOrdersExists())
 return(true);
 if(InpPendingClosePrevious)
 m_need_delete_all=true;
 int size_need_pending=ArraySize(SPending);
 ArrayResize(SPending,size_need_pending+1);
 if(!InpPendingReverse)
 SPending[size_needed_pending].pending_type=ORDER_TYPE_BUY_STOP;
 else
 SPending[size_needed_pending].pending_type=ORDER_TYPE_SELL_STOP;
 SPending[size_needed_pending].indent=m_pending_indent;
 if(InpPendingExpiration>0)
 SPending[size_needed_pending].expiration=(long)(InpPendingExpiration*60);
 if(InpPrintLog)
 Print(__FILE__," ",__FUNCTION__,", OK: ", "Signal BUY STOP");*/
//---
   return(true);
  }
 
suhas jetithor #:
Really sir you have done tremendous software it is really useful for new traders. I was very happy when I saw my amount increasing day by day. 
But you have not installed in withdrawals option for customers due to that company is cheating to the poor customer 
I'm also suffering from this with your software I earned $577 but company is not responding my phone, email. So my money stucked in your software.  
So while giving authority to the companies handling software suggest them not to cheat with poor. 
Regards 
Hope for the best 
 
suhas jetithor #:
Really sir you have done tremendous software it is really useful for new traders. I was very happy when I saw my amount increasing day by day. 
But you have not installed in withdrawals option for customers due to that company is cheating to the poor customer 
I'm also suffering from this with your software I earned $577 but company is not responding my phone, email. So my money stucked in your software.  
So while giving authority to the companies handling software suggest them not to cheat with poor. 
Regards 
Hope for the best 

Your money is not stuck in the software, but in your broker's trading account.

You should contact your broker and their regulating authority to help you.

Don't confuse MQL5.com with your broker, they are 2 different things.

 
Dear Vladimir Karputov, Thanks for new ideas on EA coding and sharing ; Happy New Year !
 
thank for shareing,good job
 

Dear Vladimir Karputov, 

A big thank for  your work and your involvement in the community.

There is an error in the code.
In the PendingOrder function, if a custom volume is set for a pending order the ea won't open it because the free_margin_check calculation is bad because check_order_type = -1

   ENUM_ORDER_TYPE check_order_type=-1;
   double check_price=0.0;
   if(SPending[index].volume>0.0)
      check_lot=SPending[index].volume;
   else
     {
      //--- check volume before OrderSend to avoid "not enough money" error (CTrade)
      switch(SPending[index].pending_type)
        {
         case  ORDER_TYPE_BUY:
            check_order_type=ORDER_TYPE_BUY;
            break;
         case ORDER_TYPE_SELL:
            check_order_type=ORDER_TYPE_SELL;
            break;
         case ORDER_TYPE_BUY_LIMIT:
            check_order_type=ORDER_TYPE_BUY;
            break;
         case ORDER_TYPE_SELL_LIMIT:
            check_order_type=ORDER_TYPE_SELL;
            break;
         case ORDER_TYPE_BUY_STOP:
            check_order_type=ORDER_TYPE_BUY;
            break;
         case ORDER_TYPE_SELL_STOP:
            check_order_type=ORDER_TYPE_SELL;
            break;
         default:
            return(false);
            break;
        }
      //--- 
      //...
     }
//...
//--- check volume before OrderSend to avoid "not enough money" error (CTrade)
   double free_margin_check=m_account.FreeMarginCheck(m_symbol.Name(),
                            check_order_type,check_lot,check_price);


The switch should be outside .

Anyway, thank for sharing this tool


 
Mike Pascal Plavonil # :

Dear Vladimir Karputov, 

A big thank for   your work and your involvement in the community.

There is an error in the code.
In the  PendingOrder function, if a custom volume is set for a pending order the ea won't open it because the free_margin_check calculation is bad because  check_order_type = -1


The switch should be outside .

Anyway, thank for sharing this tool


Thank you, changes have been made to the Trading engine 4 code (version "4.012").