need advice from a trawl pro that controls two positions independently of each other, how can it be implemented? - page 3

 
Add a majik check and that's it
 


charony:

put a trawl, works fine on one position

but if there is more than one position, e.g. two Sell

it closes both of them at the same time

i need a trawl to work for each position separately

when trading manually it is possible, i.e. one position has a Sell StopLoss

the other Sell position has a different StopLoss

google did not help

charony:

I explained to all positions 50 pips trawl

And who wrote this, Sanja Pushkin?

 

If all positions have a 50-point trawl, then it is one trawl for all positions,

and if for each position separately, it means that each position has a trawl of a certain size.

How do you want it?

 

Another example

1sell na 1000--------------------------------- price went down

1sell on 950-----------------------------------------calls 1sell on the plus side, price is down

2sell na 900-----------------------------------------

899--------------------------------------- went down here and bounced back to 960

both positions close 1sell on the upside,2sell on the downside

I don't need it that way, so I'm asking if in manual trading

I could put a 50 pips trawl on both positions,

but they won't close at the same time

both positions have a 50 pips trawl.

 
for(int n=0; n<=OrdersTotal(); n++)          
     {
      if (OrderSelect(n-1,SELECT_BY_POS)==true) 
        {                                       
         int Tip=OrderType();                   
         if(OrderSymbol()!=Symbol()||Tip>1)continue;
           if(OrderTicket()>0)
              Ticket=OrderTicket();  
// пробовал отсортировать потикетам,безуспешно
пробовал отсортировать потикетам,безуспешно
 

I don't get it at all.

If the trawl is the same size, it will collect all stops in one place (at the same price level) if the position trawl is triggered.

 
sanyooooook:

I don't get it at all.

If the trawl is the same size, it will collect all stops in one place (at the same price level) if the position trawl is triggered.


If the trawl is the same size, it will collect all stops in the same place if the position is triggered,

 
charony:


I have no such problem with manual trading, that's why I asked,

Probably because the trawl doesn't have time to work.

I have to be careful when trading with an Expert Advisor, because it does not have time to work with the trawl.

 
sanyooooook:

I think it is because the trawl does not have time to work.

In the case of an EA, the cycle is started and the price is no longer taken into account.


There is enough time, between 1sell and 2sell about two hours
 

on the 2sell the trawl should have put the SL at 850

i got it close at 950, not at manual trade

How can it be solved in the code?

Reason: