"Phoenix - FAQ, Stable, User support -Read Post #1" - page 6

 

5.6.7 Changelog

Removed 5.6.7 - See below for 5.6.7a. Same changelog applies minus the OrderProfit Check.

The latest bugfix version of Phoenix has been released. Wackena's logs and insight were very helpful. (Debugging exit strategies and waiting for a trade to close at a profit can take a while sometimes.)

changelog 5.6.7

Entire function CheckCloseAfterHours() is now commented out by default. Was previously disabled in 5.6.6

Mode3 SL code has a series of changes:

Set OrderProfit check on mode1 trade to be at least "10". If a dynamic value would be better, please suggest. Submitted by Wackena.

Relocated RefreshRates calls

Added and flagged error reporting on 2nd trade

If New SL is equal or worse to old SL value, don't modify the trade. This extra safety feature added after an immediate refresh rates call.

Added safe history feature to Trade3 history check. If trailing stops are used a higher value for total searched history may be better.

 

This code may also be a problem. If BreakEvenAfterPips=0 or higher number>0, then the following OrderModify() call can be triggered. Point * (BreakEvenAfterPips=0)=0.

Wackena

//+------------------------------------------------------------------+

//| START Function Check BreakEven |

//+------------------------------------------------------------------+

void CheckBreakEven()

{

for(int i=0;i<OrdersTotal();i++)

{

if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false) break;

if(OrderMagicNumber()!=MAGICMA_A || OrderSymbol()!=Symbol()) continue;

if(OrderType() == OP_BUY)

{

if((Bid-OrderOpenPrice()) > (Point*BreakEvenAfterPips))

OrderModify(

OrderTicket(),

OrderOpenPrice(),

OrderOpenPrice(),

OrderTakeProfit(),

0,

GreenYellow);

}

if(OrderType() == OP_SELL)

{

if((OrderOpenPrice()-Ask) > (Point*BreakEvenAfterPips))

OrderModify(

OrderTicket(),

OrderOpenPrice(),

OrderOpenPrice(),

OrderTakeProfit(),

0,

Red);

}

}

}

//+------------------------------------------------------------------+

//| END Function Check BreakEven |

//+------------------------------------------------------------------+
 

Values of zero are ignored. Could we move this to the development thread?

if(BreakEvenAfterPips != 0) CheckBreakEven();

 

Darak

I want to change from 5606 to P5607a

What shall I do with my "old trades" ? Leave them on fire or close it all ?

Yes I know in demo it's non sense but for real one...

 

lol as we talked about in chat, you can leave your trades open. As long asthe magic number is the same, the EA will continue trading as normal. Switching versions will appear uninterrupted. It is best to stop the EA while the changeover is taking place, or remove the old EA from all trades before adding the new one.

 
daraknor:
lol as we talked about in chat, you can leave your trades open. As long asthe magic number is the same, the EA will continue trading as normal. Switching versions will appear uninterrupted. It is best to stop the EA while the changeover is taking place, or remove the old EA from all trades before adding the new one.

UUhhhhhhhhh ! UUhhhhhh !

That's a good one !

I didn't know that !

And will avoid a lot of mistake(s) in newbi account... and mine !

Thanks Darak

 
bertbin:
Darak

I want to change from 5606 to P5607a

What shall I do with my "old trades" ? Leave them on fire or close it all ?

Yes I know in demo it's non sense but for real one...

After EA change, global variables (for mode3) resetting occur. I remember they before change, and restore manually after that. Don't know if it necessary/works.

 

I added an extra filter to avoid making worse (or the same) SL order. If the global variable is deleted, the secondary filter will be used.

What you say would definitely affect an upgrade from 5.6.3 to 5.6.6 however.

 

Hi

If i set Prefsettings=false, then i get in Backtesting no entrys no trades. Perhaps someone can help, by posting a .set file.

Did i have to set DVBuySell and so on??

Thanks for Helps

 
sentaco:

If i set Prefsettings=false, then i get in Backtesting no entrys no trades. Perhaps someone can help, by posting a .set file.

Did i have to set DVBuySell and so on??

If you set PrefSetting=False, then, of course, you need to enter the numbers manually. Here you can see (attached) all current default settings: (msg 19)

https://www.mql5.com/en/forum/175571

Yes, you have to set all numbers.

I think, proper procedure would be:

1.0 - keep PrefSetting on true

1.1 - procede with backtesting

2.0 - set PrefSettings to false

2.1 - manually enter all default PrefSettings, of course for the same pair

2.2 - procede with backtesting

3.0 - compare results and if they are the same, then you are set to go and you can start playing with your own settings...

More about how to do, read manuals in 1st msg of this thread

Mario