Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Youtube: https://youtu.be/__4S1lBsRSQ
- #include<Trade\Trade.mqh> CTrade trade;
- double beneficio=-0.5;
- void OnTick()
- {
- for(int a=0; a<PositionsTotal() ; a++)
- {
- ulong Ticket=PositionGetTicket(a);
- if(PositionGetDouble(POSITION_PROFIT)<=beneficio)
- {
- trade.PositionClose(Ticket,-1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment