Haukas wrote: Sun Sep 03, 2017 5:37 am
Is very simple,EA must open a grid at a certain distance(for example only sell at a distance of 5 pips).Doens-t metter what is the direction of the price(short or long),but in the same time trying to close in basket the last looser(we have a grid of6 all in negative,the price goes down and 4 positions become positive so allowds the last negative to close with a small profit).If the price keeps going long,the grid must open the posotions as before(any 5 pips)untill gets to the number of grid tht we want(this must happen also if the price goes short)
Once it gets to the number that we want (for example 10),the grid opens only positions as before only when the price is up the grid,trying to close the last looser in basket,but calculating that at the end of basket must remain not less that the number of grid that we want (10 as before).If the price comes again short and EA has opened 13 positions and cannot close the last looser there is no problem,EA doesn-t need to do anything ,just let the profit run.
It should be able to do it also in buy if wanted
You need to focus only in the way to open and to close in basket,dont think at take profit and stop loss.Everything is covered.
sorry for that im confused , but you basically want to cover the last loosing trade within the overall profit , but for it to be a losing trade it have to be closed somewere, either by stopploss or a opposite strategy . I just like you dont belive in takeprofit and stoploss at all but it has to close somewere.
or if it closes the overall profit from all of your charts when it reaches a certain number , you will have loosing trades as well but to logg all of the losses amount and to cover that is complex .
sure we can have a basket of loosing trades and if the profit is above that it closes the trades and continues.
or do you mean that if it reaches the last grid it closes all of the profit including the loosing once and then it goes again , and if it goes above the amount of what the loosing positions were it closes the trades in profit and then continue ?