forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Software

Create and Test Forex Strategies

You are not logged in. Please login or register.


(Page 2 of 2)

Forex Software → Portfolio Expert → New Portfolio Expert with Protections and a News Filter

Pages Previous 1 2

You must login or register to post a reply

RSS topic feed

Posts: 26 to 31 of 31

Re: New Portfolio Expert with Protections and a News Filter

> Question: is F3 the final solution? Or just a temporary workaround?

The expert should remove the trade hold at midnight if it runs properly.
I'll try to see how to make it more robust.

Re: New Portfolio Expert with Protections and a News Filter

did you guys have the same problem that ea does nothing in mt4 tester? i have to change in code

void OnTick(void)
  {
   if(ArraySize(Time) < requiredBars)
      return;

   if(!MQLInfoInteger(MQL_TESTER))
     {
      UpdateAccountProtection();
      CheckAccountProtection();

to

void OnTick(void)
  {
   if(ArraySize(Time) < requiredBars)
      return;

   if(MQLInfoInteger(MQL_TESTER))
     {
      UpdateAccountProtection();
      CheckAccountProtection();

than ea open trades.

28 (edited by Roughey 2024-09-06 09:03:10)

Re: New Portfolio Expert with Protections and a News Filter

@Popov there must be a bug in Position Calculation. Can someone check. When i make visual MQL Tester .
The Position calculation is wrong and it not show Profit

I check again. when i leave in settings all to 0 it is calculating positions wrong and not show Profit. When i use 10 positions than it shows profit and calculate good..So if we use Posit stats true only it is calculating wrong


i justed check code

in OnTick this line must be deleted and it worked.

   if(MQLInfoInteger(MQL_TESTER))
     {
      UpdateAccountProtection();
      CheckAccountProtection();

      const datetime time = TimeCurrent();
      if(time > lastStatsUpdate + 3)
        {
         lastStatsUpdate = time;
//         if(Max_OpenPos > sigma || Max_OpenLots > sigma)
            SetPosStats();

         UpdateStats();
        }
//         if(Max_OpenPos > sigma || Max_OpenLots > sigma)

In in your behaviour cause u let us set PosStat ON/OFF it have to be

if(Pos_Stat)
            SetPosStats();

I think ;-)

29 (edited by Roughey 2024-09-07 09:06:02)

Re: New Portfolio Expert with Protections and a News Filter

Daily Loss:

Now i checked why is when i set Daily Loss 1000. Than it show eg 3000 and activate to late? Normally it should close and suspend at 1001.

BTW: What the difference between MaxOpen Lots and Max Positiions?

Re: New Portfolio Expert with Protections and a News Filter

There must be a BUG.

The globalVariables are not initialized @Popov

You have forgot to call the function in OnInit!

   InitGlobalVariables();

<--

Re: New Portfolio Expert with Protections and a News Filter

where is @Popov

Posts: 26 to 31 of 31

Pages Previous 1 2

You must login or register to post a reply

Forex Software → Portfolio Expert → New Portfolio Expert with Protections and a News Filter

Similar topics in this forum