Download MetaTrader 5

Your profitable EA contains how many lines of code?

To add comments, please log in or register
Dua Yong Rew
5553
Dua Yong Rew  
  • 26%
    (20)
  • 22%
    (17)
  • 18%
    (14)
  • 9%
    (7)
  • 24%
    (18)
Total voters: 71
Dua Yong Rew
5553
Dua Yong Rew  
My ea only contains between 300 to 500 lines. It's a simple one. Seems people are having more complicated eas
Bharamappa Gojanur
351
Bharamappa Gojanur  
is there any relation between number of lines and profitability of an EA ?
Alain Verleyen
Moderator
35042
Alain Verleyen  
drbmgojanur:
is there any relation between number of lines and profitability of an EA ?

Of course, here is the formula :



Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
angevoyageur:

Of course, here is the formula :

Quadratic Equation ?

Try this instead  https://en.wikipedia.org/wiki/Source_lines_of_code    

Quadratic equation - Wikipedia, the free encyclopedia
Quadratic equation - Wikipedia, the free encyclopedia
  • en.wikipedia.org
In this physics example, a ball with uniform acceleration () and initial velocity () is seen at intervals of 0.05 second, with distances marked. If the ball moves a distance the time satisfies the equation: where represents an unknown, and , , and are constants with not equal to . If , then the equation is linear, not quadratic. The...
Simon Gniadkowski
Moderator
18056
Simon Gniadkowski  
doshur:
My ea only contains between 300 to 500 lines. It's a simple one. Seems people are having more complicated eas

When I set out to properly write and EA I decided that I wanted to first code all the functions that any EA I coded would need,  so I did just that,  I coded a set of standard functions to do the following:  

Take a screenshot,  Error reporting to screen and via email, Draw Fibonacci retracement,  Mutex to avoid trade context busy, Trade Sizer - calculates position size based on %age risk, PlaceTrade - determines if a order should be Market or Pending and is valid then places the trade,  CheckTrades - checks for missing SL & TP checks for pending orders becoming invalid, Spread MA function, Watchdog - checks for losing runs of x trades or more checks that losing trades are losing the correct value, trading error handler, Comments as Labels, Status messages

 

these functions are all reusable and amount to a couple of thousand lines of code . . . 

Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
Documentation on MQL5: Standard Constants, Enumerations and Structures / Objects Constants / Object Types
  • www.mql5.com
Standard Constants, Enumerations and Structures / Objects Constants / Object Types - Documentation on MQL5
Dua Yong Rew
5553
Dua Yong Rew  
drbmgojanur:
is there any relation between number of lines and profitability of an EA ?

to know the relation of complexity to profitability 

Dua Yong Rew
5553
Dua Yong Rew  
RaptorUK:

When I set out to properly write and EA I decided that I wanted to first code all the functions that any EA I coded would need,  so I did just that,  I coded a set of standard functions to do the following:  

Take a screenshot,  Error reporting to screen and via email, Draw Fibonacci retracement,  Mutex to avoid trade context busy, Trade Sizer - calculates position size based on %age risk, PlaceTrade - determines if a order should be Market or Pending and is valid then places the trade,  CheckTrades - checks for missing SL & TP checks for pending orders becoming invalid, Spread MA function, Watchdog - checks for losing runs of x trades or more checks that losing trades are losing the correct value, trading error handler, Comments as Labels, Status messages

 

these functions are all reusable and amount to a couple of thousand lines of code . . . 

wow...
Alain Verleyen
Moderator
35042
Alain Verleyen  
doshur:

to know the relation of complexity to profitability 

Seriously ? There is no relation between complexity and profitability. And there is probably neither relation between the number of lines of code and complexity.

Anyway if someone would like to check this, he can make a study based on the Codebase.

Dua Yong Rew
5553
Dua Yong Rew  
angevoyageur:

Seriously ? There is no relation between complexity and profitability. And there is probably neither relation between the number of lines of code and complexity.

Anyway if someone would like to check this, he can make a study based on the Codebase.

personal opinion

i feel the more lines of code means more complex.

another things is to check if profitable ea are simple or more complex 

Sergey Golubev
Moderator
101554
Sergey Golubev  
doshur:

personal opinion

i feel the more lines of code means more complex.

another things is to check if profitable ea are simple or more complex 

Sorry doshur - there is no any relationship between number of lines in the code and profitability (usefulness) of indicator or EA for traders.
12
To add comments, please log in or register