Libraries: MQL_Easy (For MT4) - page 2

 
Dionisis Nikolopoulos:

Hi,
Thank you!

I verify that SymbolSelect has issue with the StrategyTester. The problem may occurs on the fact that the symbols of the strategy tester are the symbols on Market watch by default. 
So, i will make an update to the framework with following change:

Regards

Thank you Dionisis, That change is working fine for me now :)
 
Kim:
When opening a position, using

execute.Position(type,volume,stopLoss,takeProfit,SLTP_PIPS);

How can I add a comment to the position?

Hi,

Of course. 

Example:

execute.Position(type,volume,stopLoss,takeProfit,SLTP_PIPS,10,"EA POSITION");

10 => the deviation 

"EA POSITION" => comment

 

When creating a position object using the command,

   CPosition positionBuy(symbol,magicNumber, GROUP_POSITIONS_BUYS);

Is it possible to have it ignore the magicNumber so that any magic number is included?

Thanks

Kim

 
Kim #:

When creating a position object using the command,

   CPosition positionBuy(symbol,magicNumber, GROUP_POSITIONS_BUYS);

Is it possible to have it ignore the magicNumber so that any magic number is included?

Thanks

Kim

Hi,

if you don't set the magic number of the position object (like position.SetGroupMagicNumber(12345)), then the magic number will be ignored.

CPosition position;
position.setGroup(GROUP_POSITIONS_BUYS);
int total = position.GroupTotal();
Print(total);


The above example print the total number of BUY positions regardless the magic number.

 
Dionisis Nikolopoulos #:

Hi,

if you don't set the magic number of the position object (like position.SetGroupMagicNumber(12345)), then the magic number will be ignored.


The above example print the total number of BUY positions regardless the magic number.

Thanks