Download MetaTrader 5

Lilith goes to Hollywood!

To add comments, please log in or register
Wouter van Den Heuvel
199
Wouter van Den Heuvel  

Hi all!


forward testing Lilith goes to Hollywood. ( free available on codebase btw)

The EA closes all the positions including on different pairs when a target has been reached.

if(Profit>=Amount){CloseAll();}


How do I change this so only positions and pending orders on that particular pair are closed?


Thanks for helping out!

Daniel Stein
26350
Daniel Stein  

Hi Wouter,

it's easier to help if you post a link to the original code or a code snippet of the EA.

 

To explain it in general you have to check if OrderSymbol() == Symbol() 

This can be added to the CloseAll() function.

 

Best regards
Daniel 

Wouter van Den Heuvel
199
Wouter van Den Heuvel  

Thanks Daniel,



I will keep messing around with it till I get it working. Cheers!

To add comments, please log in or register