[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 536

 
ilunga:

Not like this-) "=" is not a condition, but an assignment operation.

Then go like this:

Or better yet, like this (so you don't have to go twice).

Yours is better, I forgot to put !) Probably should be "||" instead of "&&".
 
Dimka-novitsek:

Thank you! Now I understand why the brackets.

Here's an old story. Finished the robot with a song of my own composition. I hope it works. And suddenly '\end_of_program' - unbalanced left parenthesis C:\TeleTRADE\experts\variantprogram.mq4 (365, 1)

As always, I've looked through the brackets and patched. I don't seem to see anything. What can it be again?


 if(Profit>AccountBalance()){  
   for(i=0;i<=OrdersTotal();i++){
   if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES) == true)
 { if(OrderSymbol() != Symbol()) continue; // тут не хватает скобки
   if (OrderMagicNumber() != 450) continue;
   if(OrderType()==OP_SELL) 
  OrderClose(OrderTicket(),OrderLots(),Ask,6,Red);
   if(OrderType()==OP_BUY)
  OrderClose(OrderTicket(),OrderLots(),Bid,6,Red);}}} 
//----
   return(0);
  }
As most brokers work on 5-digit quotes, a slip of 6 pips is not enough
 

Can you tell me if you are new to this - is the tick data with buy/sell indication not available anywhere to download?

At least as an archive for ...

 
asd123321:

Can you tell me if you are new to this - is the tick data with buy/sell indication not available anywhere to download?

At least as an archive for ...

Maybe you can find something here!
 
Thank you!!!
 
Dimka-novitsek:

Thank you! Now I understand why the brackets.

Here's an old story. Finished the robot with a song of my own composition. I hope it works. And suddenly '\end_of_program' - unbalanced left parenthesis C:\TeleTRADE\experts\variantprogram.mq4 (365, 1)

As always, I've looked through the brackets and patched. I don't seem to see anything. What could it be again?



How can it be that Profit > AccountBalance()? So if Profit is less, that's not good for you? What a grail you are making up!
 

And I'm not so sure what it is I've written!

No, that's right! What if there's more. Otherwise, let him close with trailing stops.

 
TarasBY:
Maybe you will find something useful here!

Unfortunately here is the archive for 2010 and without buy/sell, which is not interesting at all.

I will download much more up-to-date and detailed data through the Service/Quotes archive function.

The only inconvenience is that there is no tick info and no buy/sell. I kind of have to guess by Open-Close myself, which, to put it mildly, is not quite right, as even in the one-minute interval there are both sells and buys.

 
asd123321:

Unfortunately here is the archive for 2010 and without buy/sell, which is not interesting at all.

I will download much more recent and detailed data through the Service/Archive of Quotes function.

The only inconvenience is that there is no tick information and no buy/sell. I kind of have to guess by Open-Close myself, which is not quite right, to put it mildly, as even in the one-minute interval there are both sells and buys.

Then, if Google hasn't broken down, search for'tick history' for example.

P.S. It also wouldn't hurt to learn how to articulate your thoughts intelligently, so that others don't have to puzzle over "buy/sell" types.

 
Dimka-novitsek:

I don't really know what it is I've written myself!

No, that's right! What if it is more! And let them close with trailing stops.


How can the Profit be greater than the Balance? Can there be a condition on how much of the Balance! Because with this condition, it's doubling the balance from each trade!