Problem uploading my EA to the market #property strict error

 
I have created my EA, done many hours of back testing and fine tuning.
I want to upload my EA on the market to sell, however I get the error message:  "EX4 file must be compiled using #property strict directive"
I used an online EAbuilder to write my EA and compiled using Meta editor for meta trader 4.
Some advice would be greatly appreciated!
 
  1. EA builder, EA Builder Pro, EATree, Etasoft forex generator, Forex Strategy Builder, FOREXEADVISOR STRATEGY BUILDER, FX EA Builder, fxDreema, 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.08.21

  2. Always use strict. Fixing the warnings will save you hours of debugging, but you must understand the differences.

 
I have compiled using #Property strict and I get the following warning message: "Possible loss of data due to type conversion in line 320 column 36
Error warning1
 

Do not post images of code. Use the code buttons to embed it directly.

 - Don't loop from 0 to total, you're up for some nasty surprise. Always loop total-1..0.

 - Cast the datetime with (int) to coerce its value into your array, and back to datetime when you fetch it.

 
JAN HENDRIK VILJOEN:
I have compiled using #Property strict and I get the following warning message: "Possible loss of data due to type conversion in line 320 column 36

Hello,

the orderlist variable is 'int'

The ordertime parameter is 'datetime'

you can to use (but test it if work as you want)...

orderList[orderCount-1][0]=(datetime)OrderOpenTime();
 

Forum on trading, automated trading systems and testing trading strategies

Problem uploading my EA to the market #property strict error

Nikolaos Pantzos, 2021.01.16 10:58

Hello,

the orderlist variable is 'int'

The ordertime parameter is 'datetime'

you can to use (but test it if work as you want)...

orderList[orderCount-1][0]=(datetime)OrderOpenTime();

I tried this line of code and I get the same warning message as before

 
  1. (datetime)OrderOpenTime();

    The cast does nothing — OOT is already a datetime.

  2. int OrderList[][2]
    Cast it to an int.
Reason: