I want to put a pending order to open a buy position. There is confusion about the BUY_STOP and BUY_LIMIT orders. Can they be used to open a position or are they just a stop loss and take profit? I do not understand this.
Thanks, got it figured out. It turns out they have different triggering parameters. Some are triggered by Ask, others by Bid. Who would have thought it:)
BooGUY: Could you please tell me how to execute a buy or sell condition in an EA with a custom indicator? For example, the custom indicator gives arrows to buy or sell, iCustom(...0) and iCustom(...1) are, as I understand, buffer indices that contain sell and buy, but how to write a condition in an EA, please advise.
let's say :
d1=icustom(Symbol(), "Zig zag", 0, 0, 0, 1);
if (d1!=0) {OrdOpen(0,OP_BUY,flot,MG);}
total - Number of elements to calculate. 0 means all elements of the array.
I don't understand the role of total and why it always equals zero
It's not always zero. If you enter zero by yourself when calling this function, the whole array [] will be processed. If you put 100 there, 100 elements of array [ ] will be processed.
Does mql4 know how to set pending orders?
Stop Loss and Take Profit are order parameters, not orders.
see Types and characteristics of orders
eddy
Thanks, got it figured out. It turns out they have different triggering parameters. Some are triggered by Ask, others by Bid. Who would have thought it:)
Could you please tell me how to execute a buy or sell condition in an EA with a custom indicator? For example, the custom indicator gives arrows to buy or sell, iCustom(...0) and iCustom(...1) are, as I understand, buffer indices that contain sell and buy, but how to write a condition in an EA, please advise.
let's say :
total- Number of elements to calculate. 0 means all elements of the array.
I don't understand the role of total and why it always equals zero
total - Number of elements to calculate. 0 means all elements of the array.
I don't understand the role of total and why it always equals zero
If you put 100 there, 100 elements of array [ ] will be processed.