Forum

unbalanced parantheses

I can't figure out the correct way to put the brackets. Please explain what my mistake is. int start() { //---- { pending = ExistOrders( NULL ); if (pending > 0 ) { return ;} positions = ExistPositions( NULL ); if (positions > 0 ) { return ;} } else { ticket= OrderSend ( Symbol

Get profit last closed position in point.

Hi! I need to get profit in point of last closed position. This is the code, but something wrong. Please help. Thank you. double GetProfitLastClosePosInPoint( string sy= "" , int op=- 1 , int mn=- 1 ) { double p; int i, k=OrdersHistoryTotal(), pr= 0 ; if (sy== "0" ) sy= Symbol ();