I sent my EA BUT is ERROR

 

I don't know what i wrong  thank u everyone


I don't know what i wrong pls tell me   thank u everyone

 
//+------------------------------------------------------------------+
//| Return the maximum allowed volume for an order on the symbol     |
//+------------------------------------------------------------------+
double NewOrderAllowedVolume(string symbol)
  {
   double allowed_volume=0;
//--- get the limitation on the maximal volume of an order
   double symbol_max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_MAX);
//--- get the limitation on the volume by a symbol
   double max_volume=SymbolInfoDouble(Symbol(),SYMBOL_VOLUME_LIMIT);

//--- get the volume of the open position by a symbol
   double opened_volume=PositionVolume(symbol);
   if(opened_volume>=0)
     {
      //--- if we have exhausted the volume
      if(max_volume-opened_volume<=0)
         return(0);

      //--- volume of the open position doesn't exceed max_volume
      double orders_volume_on_symbol=PendingsVolume(symbol);
      allowed_volume=max_volume-opened_volume-orders_volume_on_symbol;
      if(allowed_volume>symbol_max_volume) allowed_volume=symbol_max_volume;
     }
   return(allowed_volume);
  }

Study this article before submitting your EA to market.

The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
Yashar Seyyedin #:

Study this article before submitting your EA to market.

i use fxdreema to make Ea how to do this

 
Wasupol Kongdetudomkul #:

i use fxdreema to make Ea how to do this

This is post about fxdreema - 

--------------------------------------

That is not your code. It is generated code by the fxdreema code builder, and most code builders are all know for producing questionable code.

The reference below is from another forum thread so point (2) and some of point (3) is not appropriate for you case, but point (1) is definitely relevant.

Forum on trading, automated trading systems and testing trading strategies

Create trail stop and breakeven function for purchase or sell grid

William Roeder, 2022.09.11 19:38

  1. EA builder, EA Builder Pro, EATree, Etasoft forex generator, ForexEAdvisor Forex Strategy Builder, ForexEAdvisor, ForexRobotAcademy.com, FX EA Builder, fxDreema, Forex Generator, FxPro, Molanis, Octa-FX Meta Editor, Online Forex Expert Advisor Generator, Strategy Builder FX, Strategy Quant, Visual Trader Studio, MQL5 Wizard, etc., are all the same. You will get something quick, but then you will spend a much longer time trying to get it right, than if you learned the language up front, and then just wrote it.

    1. Since you haven't learned MQL4/5, therefor there is no common language for us to communicate.
      If we tell you what you need, you can't code it.
      If we give you the code, you don't know how to integrate it into yours.
      We are willing to HELP you when you post your attempt (using Code button) and state the nature of your problem, but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own.

    2. EA builder makes bad code counting up while closing multiple orders.
      EA builder makes bad code Bars is unreliable (Max bars in chart), volume is unreliable (miss ticks.) Always use time.
      EA builder makes bad code, not adjusting for 4/5 digit brokers, TP/SL and slippage.
      EA builder makes bad code, not adjusting for ECN brokers. pre-Build 500)
      EA builder makes bad code, not checking return codes.

    3. EATree uses objects on chart to save values — not persistent storage (files or GV+Flush.) No recovery (crash/power failure.)

    4. FX EA Builder makes bad code, not checking return codes.
      FX EA Builder makes bad code, loosing open tickets on terminal restart. No recovery (crash/power failure.)
      FX EA Builder makes bad code, not adjusting stops for the spread.
      FX EA Builder makes bad code, using OrdersTotal directly.

    5. FOREXEADVISOR STRATEGY BUILDER makes bad code, non-updateing global variables.
      FOREXEADVISOR STRATEGY BUILDER makes bad code, compilation errors.
      FOREXEADVISOR STRATEGY BUILDER makes bad code, not checking return codes.

    Learn to code it, or pay someone (Freelance) someone to code it.
              Hiring to write script - General - MQL5 programming forum #1 (2019)

  2. Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
              General rules and best pratices of the Forum. - General - MQL5 programming forum (2019)
              Messages Editor

  3. Help you with what? You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
              No free help (2017)

    Or pay someone. Top of every page is the link Freelance.
              Hiring to write script - General - MQL5 programming forum (2018)

    We're not going to code it for you (although it could happen if you are lucky or the problem is interesting).
              No free help (2017)

 
Sergey Golubev #:

This is post about fxdreema - 

--------------------------------------

That is not your code. It is generated code by the fxdreema code builder, and most code builders are all know for producing questionable code.

The reference below is from another forum thread so point (2) and some of point (3) is not appropriate for you case, but point (1) is definitely relevant.

sorry if i use fxdreema cannot put in mql5   no?

 
Wasupol Kongdetudomkul #:

sorry if i use fxdreema cannot put in mql5   no?

I do not know ... because if you use it so you should manually fix everything related to your EA, for example:

... or ask someone in Freelance to fix it for you ... but if you use Freelance so why do you need fxdreema?

The checks a trading robot must pass before publication in the Market
The checks a trading robot must pass before publication in the Market
  • www.mql5.com
Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by developers in their technical indicators and trading robots. An also shows how to self-test a product before sending it to the Market.
 
Wasupol Kongdetudomkul #: sorry if i use fxdreema cannot put in mql5   no?

What part of “but we are not going to debug your hundreds of lines of code. You are essentially going to be on your own” was unclear?

I sent my EA BUT is ERROR
I sent my EA BUT is ERROR
  • 2024.07.15
  • Wasupol Kongdetudomkul
  • www.mql5.com
I don't know what i wrong pls tell me thank u everyone...