EA for the indices such as the Dow Jones or the DAX30

 

Good morning everyone,

My EA works when I use it on the EURUSD but not for the indices such as the Dow Jones or the DAX30.

Here is the code I use to send an order to buy:

int buy = OrderSend(Symbol(), OP_BUY, lots, Ask, 4, Ask - (stop * Point), Ask + (profit * Point), "Ordre Achat Scalping", magic, 0, clrGreen);


I do not think it is related to the margin or the capital of the account, maybe I should not use the term Symbol() but I really cannot find the right term to use.


Does anyone know the reason why?

Thanks a lot for your help and your time.

Luciole


 

Code the EA so that it reports the error when the order is not successful.

Make sure that the lot size is valid.

 
Keith Watford:

Code the EA so that it reports the error when the order is not successful.

Make sure that the lot size is valid.

problem solved !

Thanks a lot for your help :)

Reason: