Hello guys,
I've read through the docs on mql4 on the order send but for some reason my order is not being put through because Im guessing the criteria is never met as no errors appear in the journal.
Do any of you guys see what could be wrong with my code?
Code:
if (OrdersTotal() ==0 && sPatternType == "Butterfly" && Ask > RectanglePriceMax && Ask < RectanglePriceMin)
{
OrderSend(Symbol(),OP_BUYLIMIT,1,RectanglePriceMin,3,RectanglePriceMax,RectanglePriceMin +50*Point,"Order Sent", 16384,0,Green);
Print("Recmax:", RectanglePriceMax, "Recmin:", RectanglePriceMin, "This is for the bullish pattern");
}
I've read through the docs on mql4 on the order send but for some reason my order is not being put through because Im guessing the criteria is never met as no errors appear in the journal.
Do any of you guys see what could be wrong with my code?
Code:
if (OrdersTotal() ==0 && sPatternType == "Butterfly" && Ask > RectanglePriceMax && Ask < RectanglePriceMin)
{
OrderSend(Symbol(),OP_BUYLIMIT,1,RectanglePriceMin,3,RectanglePriceMax,RectanglePriceMin +50*Point,"Order Sent", 16384,0,Green);
Print("Recmax:", RectanglePriceMax, "Recmin:", RectanglePriceMin, "This is for the bullish pattern");
}
Know your indicators!