Discussion of article "Creating an EA that works automatically (Part 09): Automation (I)"

 

New article Creating an EA that works automatically (Part 09): Automation (I) has been published:

Although the creation of an automated EA is not a very difficult task, however, many mistakes can be made without the necessary knowledge. In this article, we will look at how to build the first level of automation, which consists in creating a trigger to activate breakeven and a trailing stop level.

The video below demonstrates this system in operation. For those who imagine that this is something different or non-functional, watch the video and draw your own conclusions. Although the best thing to do in order to understand what's going on is to compile the EA and do your own tests on a DEMO account. In this way, the understanding of the entire system will be more solid and clear.

Video 01. Demonstration of the Stop system via pending order.


Author: Daniel Jose

 

Hello, I've been following along and implementing your EA but ive run into an error I cannot get to the bottom of. Can you assist with the errors. The errors are:


'C_ManagerAce.mqh' C_ManagerAce.mqh

'C_Orders.mqh' C_Orders.mqh

'C_Terminal.mqh' C_Terminal.mqh

'C_Terminal::GetTerminalInfos' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::GetTerminalInfos' C_Terminal.mqh

'C_Terminal::FinanceToPoints' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::FinanceToPoints' C_Terminal.mqh

'C_Terminal::GetTerminalInfos' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::GetTerminalInfos' C_Terminal.mqh

'C_Terminal::FinanceToPoints' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::FinanceToPoints' C_Terminal.mqh

'C_Terminal::GetTerminalInfos' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::GetTerminalInfos' C_Terminal.mqh


I used the same exact code as you becuase im learning programming once again. I have a bachelors in computer science. I dont understand why I get these errors when I compile my code and I have the code as you and yours compile. Help Please


 
kinghussle #:

Hello, I've been following along and implementing your EA but ive run into an error I cannot get to the bottom of. Can you assist with the errors. The errors are:


'C_ManagerAce.mqh' C_ManagerAce.mqh

'C_Orders.mqh' C_Orders.mqh

'C_Terminal.mqh' C_Terminal.mqh

'C_Terminal::GetTerminalInfos' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::GetTerminalInfos' C_Terminal.mqh

'C_Terminal::FinanceToPoints' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::FinanceToPoints' C_Terminal.mqh

'C_Terminal::GetTerminalInfos' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::GetTerminalInfos' C_Terminal.mqh

'C_Terminal::FinanceToPoints' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::FinanceToPoints' C_Terminal.mqh

'C_Terminal::GetTerminalInfos' - cannot access private member function C_ManagerAce.mqh

   see declaration of function 'C_Terminal::GetTerminalInfos' C_Terminal.mqh


I used the same exact code as you becuase im learning programming once again. I have a bachelors in computer science. I dont understand why I get these errors when I compile my code and I have the code as you and yours compile. Help Please

The errors you are reporting are due to the attempt to access something private to the class, outside the body of the class. I suggest you start with something a little simpler first. For this, first try to understand what private clauses and public clauses are. But mainly, why use one or the other.