Cannot call OrderSend inside an indicator.
I've got an indicator that signals an action by sound and alert:
I wanted to add there the OrderSend function to auto buy-sell and it looks this way:
When the time comes, there is the signal, there is the alert but there are no orders.
Any ideas what is wrong?
No. Indicators do not call anything. They indicate.
Write a script or EA. Get the indicators values via iCustom and when the condition is correct open.
I've got an indicator that signals an action by sound and alert:
I wanted to add there the OrderSend function to auto buy-sell and it looks this way:
When the time comes, there is the signal, there is the alert but there are no orders.
Any ideas what is wrong?