Experts: Martin - page 3

 
Your codes are always interesting.  can you add a code to close the previous opened position when a new order is placed? if you don't want to add it to this EA, kindly write it out so i can work around it. thanks.
 
omotola agbaje # :
Your codes are always interesting.  can you add a code to close the previous opened position when a new order is placed? if you don't want to add it to this EA, kindly write it out so i can work around it. thanks.

Do you understand exactly the difference between a "pending order" and a "position"? Please clarify your question.

 
Vladimir Karputov #:

Do you understand exactly the difference between a "pending order" and a "position"? Please clarify your question.

What I mean is when a new position opens with the new coefficient,  the previous loosing trade will still be trading there by having more than one opened position eating into the available margin. Can you program it so that there'll be only one position at a time?
The takeprofit will still consider the average of the lost trade. With this, the free margin will not be affected with all opened loosing trades... 
I hope you understand?
 
omotola agbaje # :
What I mean is when a new position opens with the new coefficient,  the previous loosing trade will still be trading there by having more than one opened position eating into the available margin. Can you program it so that there'll be only one position at a time?
The takeprofit will still consider the average of the lost trade. With this, the free margin will not be affected with all opened loosing trades... 
I hope you understand?

I do not understand. Show me an example.

 
Vladimir Karputov #:

I do not understand. Show me an example.

I really don't know how else to explain it and I've searched online but couldn't find an example matching it...
Can you write out a small code where a buy position will open (position 1) and after 10 steps a 2nd buy position will open ( position 2). Once position 2 is opened, position 1 will close automatically?
 
omotola agbaje # :
I really don't know how else to explain it and I've searched online but couldn't find an example matching it...
Can you write out a small code where a buy position will open (position 1) and after 10 steps a 2nd buy position will open ( position 2). Once position 2 is opened, position 1 will close automatically?

Not enough data: what is the position? BUY or SELL? Who opens the first and second positions?

 
Vladimir Karputov #:

Not enough data: what is the position? BUY or SELL? Who opens the first and second positions?

Thanks for your patience. 
The 1st position is buy while the 2nd position is sell with an increase in lots (×2) and the 3rd position will be buy also with ×2 lots.
When the 2nd position opens(sell) the 1st position closes and when the 3rd position opens, the 2nd position closes. There'll be only one position opened at a time.
 
omotola agbaje # :
Thanks for your patience. 
The 1st position is buy while the 2nd position is sell with an increase in lots (×2) and the 3rd position will be buy also with ×2 lots.
When the 2nd position opens(sell) the 1st position closes and when the 3rd position opens, the 2nd position closes. There'll be only one position opened at a time.

Who opens these positions? Are you manually? Can not understand anything.

 
Vladimir Karputov #:

Who opens these positions? Are you manually? Can not understand anything.

Let me put it this way, try to edit this martin EA so that there'll be only one position running at a time.
I was testing it and when there are like 5 opened positions, the drawdown will be huge. So I want the loosing trade to close while the newest trade will still aim for TP. 
Or you input stoploss for each trade.
If you still don't understand me, maybe I'll really take my time to compose the logic... Thanks
 
omotola agbaje # :
Let me put it this way, try to edit this martin EA so that there'll be only one position running at a time.
I was testing it and when there are like 5 opened positions, the drawdown will be huge. So I want the loosing trade to close while the newest trade will still aim for TP. 
Or you input stoploss for each trade.
If you still don't understand me, maybe I'll really take my time to compose the logic... Thanks

You yourself are digging a hole for your deposit when you use martingale. So it was and will always be - the desire for quick profit always ends in the same way: the deposit comes to an end.