Forum

'}' - not all control paths return a value

Hello everyone. I have coded this, and I think that I cover all possibilities. Why is it still saying that this function/method does not return a value? double Lots() { if (OrdersHistoryTotal()> 0 ) { for ( int i=OrdersHistoryTotal();i> 0 ;i--) { //Select closed

Stoploss moving on every tick

Hello, everyone. Ich have coded this here: for ( int i= 0 ;i< OrdersTotal ();i++) { bool select = OrderSelect (i,SELECT_BY_POS,MODE_TRADES); //Iteration through every trade if (OrderMagicNumber()== 1 && OrderSymbol()== Symbol ()) //if Trade==BUY {

Two simple errors (My first EA)

//+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit () { //--- //--- return ( INIT_SUCCEEDED ); }