The Addposition function does not work. It closed the previous order and opens a new order and close that order right a way. Sometimes it opens several orders and close it right a way. I want that Addposition loop should continue with 20 pip gap and until next singal come. Here is an example of how it should work:
1st order Sell open: 1.3255
2nd order sell open: 1.3235 (should not close first order)
3rd order sell open: 1.3215 (should not close first and second order)
4th order sell open: 1.3195 (should not close first second and third order)
continue until the next buy signal comes. Also I want to use Basketpips TP or SL option to close each
order. For example, if I set Basketpips TP is 40 then
1st order Sell close: 1.3215
2nd order sell close: 1.3195
........ continue until next signal.
When an opposite signal comes, it should close all open orders.
Basketpips TP is perfect but please check the SL should be in numbers not pertentage.
Please check the code and update it.