Multiple positions

To add comments, please log in or register
Feranmi Omokayode
24
Feranmi Omokayode  
Please where can I get a robot or a script that will open multiple positions based on the position I open myself. Say I open a position with 1lot and fixed stop loss and take profit levels, it just takes these parameters and open the same position on the same pair like 10 or more times.
Eleni Anna Branou
Moderator
6601
Eleni Anna Branou  
Feranmi Omokayode:
Please where can I get a robot or a script that will open multiple positions based on the position I open myself. Say I open a position with 1lot and fixed stop loss and take profit levels, it just takes these parameters and open the same position on the same pair like 10 or more times.

Have a search in the Market, I believe you will find a utility or expert that can help you with that.

fxsaber
10288
fxsaber  
Feranmi Omokayode:
Please where can I get a robot or a script that will open multiple positions based on the position I open myself. Say I open a position with 1lot and fixed stop loss and take profit levels, it just takes these parameters and open the same position on the same pair like 10 or more times.
// Repeater

sinput int AmountPositions = 3;
input string OrderComment = "";

void OnTradeTransaction( const MqlTradeTransaction &Trans, const MqlTradeRequest &Request, const MqlTradeResult &Result )
{
  if ((Trans.type == TRADE_TRANSACTION_REQUEST) && (!Request.position) && (Request.comment == OrderComment))
  {
    MqlTradeResult MyResult;
    MqlTradeRequest MyRequest = Request;        
    
    bool Res = true;
    
    for (int i = 1; Res && (i <= AmountPositions); i++)
    {
      MyRequest.comment = Request.comment + "_" + (string)i;;

      Res = OrderSendAsync(MyRequest, MyResult);
    }
  }
}
Feranmi Omokayode
24
Feranmi Omokayode  
Eleni Anna Branou:

Have a search in the Market, I believe you will find a utility or expert that can help you with that.

Thanks
Feranmi Omokayode
24
Feranmi Omokayode  
fxsaber:
Does the above string work independently or needs to be combined with another code
fxsaber
10288
fxsaber  
Feranmi Omokayode:
Does the above string work independently or needs to be combined with another code

Both options can be used.

234769453454
5
234769453454  
I'm looking forward to work with you Sir
Feranmi Omokayode
24
Feranmi Omokayode  
fxsaber:

Both options can be used.

Thanks will try it.
To add comments, please log in or register