|
no longer hedging ?
Since hedging is not allowed anymore... does anyone have any trade ea manager or something that would reverse the trade immediately after close when a trade hits a stop loss...
or can any one show me how to add a pending order as a sell (below is a buy) so that it triggers as soon as sl is hit?
Thoughts?
ANy help appreciated!.
int OpenOrder(int type)
{
int ticket=0;
int err=0;
int c = 0;
if(type==OP_BUY)
{
for(c = 0 ; c < NumberOfTries ; c++)
{
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage ,Ask-StopLoss*Point,Ask+TakeProfit*Point,ExpertComment, MagicNumber,0,Yellow);
err=GetLastError();
if(err==0)
{
break;
}
else
{
if(err==4 || err==137 ||err==146 || err==136) //Busy errors
{
Sleep(5000);
continue;
}
else //normal error
{
break;
}
}
}
}
|