Can't draw basic rectangle
void OnStart() { ObjectCreate(shape, myObjectType, windowIndex, P1_day, price1, P2_day ,price2); }Create the object in start() or init()
and Check your return codes (OrderSelect)
What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
The aim is simple: draw a rectangle. I understand that I need only two points to plot it: a pair of date/price. I will attempt to fill with color and play with other properties, but first....this basic code won't work. It generates 1 error and 1 warning:
1) "expressions are not allowed ona global scope" (referring to Line 18 "bool ObjectCreate...")
2) missing ')' before ';' referring to Line 18 "...P2_day, price2); ...............don't know! I clearly see the semicolon there!