[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 596

 
rigonich:

Actually it fits, the question about int array was asked to make sure I understood the theory correctly. The point is that I want to do it to make the code five times more compact, but if to use the data I have to do every time the reverse conversion, it will be much less convenient to use such an array. And you'd like to eat some fish, as they say...
You understand the theory correctly. The solution: use an array of type double - and all fish are yours, and... (second on demand)!!! ;)
 
TarasBY:
You understand the theory correctly. Solution: use an array of type double - and all the fish are yours!!! ;)

Thank you.
 
devic063:
Hello!
Do you know if there is a script that can download quotes to MetaTrader 4 from some information resource or from a broker's site for a long period (e.g. from 2001 to 2010)?


There is more than one such script in theCode Base. All I need is something to download.

And in order to use the MQ quote archive you don't need any scripts. everything is done using the terminal's built-in tools.

 
Imagine, I place two orders with this place.
 {
//----



       if(!srabotka){
           if (profit!=0) TP = NormalizeDouble(Ask + profit*Point,Digits); else TP=0;
           if (stop!=0) SL = NormalizeDouble(Ask - stop*Point,Digits); else SL=0; 
           OrderSend (Symbol( ), OP_BUY, lot ,Ask, 5, SL,   TP, NULL, 450, 0, CLR_NONE);
           int Error=GetLastError();if (Error==0){  
           Sleep(2000); RefreshRates();
           if (profit!=0) TP = NormalizeDouble(Bid - profit*Point,Digits); else TP=0;
           if (stop!=0) SL = NormalizeDouble(Bid + stop*Point,Digits); else SL=0;  
           OrderSend (Symbol( ), OP_SELL,  lot ,NormalizeDouble(Bid, Digits), 5, 0, 0, NULL, 450, 0, CLR_NONE); 
           Error=GetLastError();
           if (Error==0){  profit = NormalizeDouble( Ask+( 45*Point),Digits);  
           srabotka= true; if(!wtoraya__stupen)tsena=Ask;}}}//Цену запоминаем только лиш в самом начале. 
           
           if (Error!=0){ string errorcomment = "Ошибка открытия  ордера OP_BUY"  + " " + Symbol() +  " " + ErrorDescript(Error); 
            Print (errorcomment);}
 //----  

Orders are placed, super! But the price passes 100pp and I put the same orders, and then suddenly there is an error of 130! Actually I do not have any stops and profits.

What can it be? AUDUSD,M30: Error opening order OP_BUY AUDUSD Wrong stops

 
Dimka-novitsek:
Imagine, I place two orders with this place.

Orders are placed, super! But the price passes 100pp and I put the same orders, and then suddenly there is an error of 130! Actually I do not have any stops and profits.

What can it be? AUDUSD,M30: Error opening order OP_BUY AUDUSD Wrong stops


This place changes the srabotka flag to true after order opening and until it is reset, no other orders can be opened by this same place.
 
nonfarm2012:

Good afternoon colleagues. I would like some advice from experienced and profitable brothers. I recently started earning good money on the strategy http://amulet-maya.ru "Three Amulets" and have not yet figured out how best to stack money at home. One hundred dollar notes in columns against the wall, or in rows on the floor? I can't walk or drive on account of all this money. What do you do?

Put up a fireplace.
 
nonfarm2012:

Good afternoon colleagues. I would like some advice from experienced and profitable brothers. I recently started earning good money on the strategy http://amulet-maya.ru "Three Amulets" and have not yet figured out how best to stack money at home. One hundred dollar notes in columns against the wall, or in rows on the floor? I can't walk or drive on account of all this money. What do you do?



According to the rules of the contest you make predictions every day. And it's forbidden to advertise brokers here.
 
Dimka-novitsek:
Can you imagine, I'm placing two warrants with this place.
...with difficulty... :)))
 
rigonich:

After opening an order, "this place" changes the flag srabotka to true and until it is reset, no other orders can be opened by it.



Well, of course! I wrote this on purpose. After 100 pips have passed in any direction, the profit order is deleted, the flag is reset and the order is opened again. But... It does not work.

This is the trick.

 
Laughing, tears flowing Got it. Thank you. You can still imagine.
Reason: