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.
Create and Test Forex Strategies
You are not logged in. Please login or register.
Forex Software → Portfolio Expert → 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.
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.
@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 ;-)
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?
There must be a BUG.
The globalVariables are not initialized @Popov
You have forgot to call the function in OnInit!
InitGlobalVariables();
<--
I'll work on the MQL code next week.
Thank you for the reports!
I'll work on the MQL code next week.
Thank you for the reports!
Hey i hope you are well. When will you update code? And i found another BUG.
It is not Showing results and when i close manually it is not calculate position size correctly.
when close manually it will not show positions correctly also lotsize
I'll check that.
Thank you for the report!
I'll check that.
Thank you for the report!
Is this fixed already i just checked but it is not working and calculate the Profit
Hey Popov,
there must be a bug in LotCalculation also posStatCount posStatLots and posStatProfit not working correctly-
when i use this function for counting profit it works
double CountProfit(void)
{
const int minMagic = GetMagicNumber(0);
const int maxMagic = GetMagicNumber(strategiesCount);
const int posTotal = PositionsTotal();
double count = 0;
for(int posIndex = posTotal - 1; posIndex >= 0; posIndex--)
{
const ulong ticket = PositionGetTicket(posIndex);
if(PositionSelectByTicket(ticket) && PositionGetString(POSITION_SYMBOL) == _Symbol)
{
const long magicNumber = PositionGetInteger(POSITION_MAGIC);
if(magicNumber >= minMagic && magicNumber <= maxMagic)
count += PositionGetDouble(POSITION_PROFIT);
}
}
return count;
}
but when i check all other thinks something is completely wrong with calculation of lots open trades and so on.
also its not counting positions correctly.
i checked on mql5
Thank you for the report!
I'll check the code and fix any problems I may find.
Thank you for the report!
I'll check the code and fix any problems I may find.
hey.. i have now checked again. for some reason i used netting account..hedge is working..
But i only the Profit Calculation is wrong or sometimes not working..maybe some other user can check also
Forex Software → Portfolio Expert → New Portfolio Expert with Protections and a News Filter
Powered by PunBB, supported by Informer Technologies, Inc.