StopLoss cross twice

 

Is there a possibility to set up the StoppLoss, so that it won't react unless the course closes at least twice under(over) it.

The problem is, that there are sometimes Bars that giving a unwilling Signal. I want to filter them out.

 
tak88js:

Is there a possibility to set up the StoppLoss, so that it won't react unless the course closes at least twice under(over) it.

The problem is, that there are sometimes Bars that giving a unwilling Signal. I want to filter them out.


A StopLoss is a StopLoss if it is not react to the price it is set then you can't call it StopLoss

you can check the bars after opening trade (or certain bar) the closeprice if the closeprice of bar 1 is for second time lower then some value then close the trade

 
tak88js:

Is there a possibility to set up the StoppLoss, so that it won't react unless the course closes at least twice under(over) it.

The problem is, that there are sometimes Bars that giving a unwilling Signal. I want to filter them out.

You can manually code the stop loss into the OrderSelect() loop:

bool StopOnce;
int barsAtStop

if(Bid <= StopLoss && StopOnce == false) 
    {
     StopOnce = true; //this is the first time it crosses
     barsAtStop = Bars;
    }

if(Bid <= StopLoss && StopOnce == true && barsAtStop != Bars)
    { OrderClose(...)  }

Remember to reset your StopOnce variable when there are no trades:

if(!OrderSelect())
StopOnce == false; //also remember that StopOnce has to be declared on a global scale.
 
gulzaar:

You can manually code the stop loss into the OrderSelect() loop:

. . . and bear in mind if your PC crashes or you lose internet connectivity you will have no control of closing orders . . . . . and you will have orders running with no SL.
 
RaptorUK:
. . . and bear in mind if your PC crashes or you lose internet connectivity you will have no control of closing orders . . . . . and you will have orders running with no SL.
excellent point lol -- in which you will have to scramble to call your broker and close your trades.