[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 213 1...206207208209210211212213214215216217218219220...632 New comment [Deleted] 2012.06.26 14:09 #2121 I want to write test results (transactions) to a file after testing I put the tofile () function in the deinit() block (it writes after the work is finished) but the function itself // Запись профитов в файл void toFile( ) { int handle=FileOpen("OrdersReport.csv",FILE_WRITE|FILE_CSV,"\t"); if(handle<0) return(0); // запишем заголовок в файл FileWrite(handle,"#","проф"); int total=OrdersTotal(); // записываем в файл только закрытые ордера for(int pos=0;pos<total-1;pos++) { //FileSeek(handle, 0, SEEK_END); if(OrderSelect(pos,SELECT_BY_POS, MODE_HISTORY)==false) continue; FileWrite(handle,OrderTicket(),OrderProfit()); } FileClose(handle); return; does not work, it records only the header Vyacheslav Kirillov 2012.06.26 14:29 #2122 So can you tell me which function returns the current price? Роман 2012.06.26 14:35 #2123 olis: So can you tell me which function returns the current price? Pazlo? Vyacheslav Kirillov 2012.06.26 16:03 #2124 Roman.: You don't have the guts? That's something! I'm not that clever, and I wouldn't have guessed it in Russian either. Alekseu Fedotov 2012.06.26 16:32 #2125 YOUNGA: I want to write test results (transactions) to a file after testing I put the tofile () function in the deinit() block (it writes after the work is finished) but the function itself does not work, it writes only the headerint total=OrdersTotal(); //заменить на int total=OrdersHistoryTotal(); как-то так // записываем в файл только закрытые ордера Vyacheslav Kirillov 2012.06.26 17:09 #2126 Roman.: You don't have the guts? It's just a "Bid" for an open order. Right? It shows me the real price. Or is this going to be a problem later on? Artyom Trishkin 2012.06.26 18:18 #2127 olis: It is simply "Bid" for an open order. Right? It shows me the current price. Or is there a problem with it later? It is not the Bid for the "open order", but the Bid for the chart on which the EA is running. How do you think the current price is different from the "real" price? You can use MarketInfo() to retrieve the current price for any symbol. It's either Ask or Bid. SymbolName/Symbol. OrderSend Cycle Operator 'for' questions How to code? Vyacheslav Kirillov 2012.06.26 18:53 #2128 artmedia70: It's not the Bid for "open order", it's the Bid for the chart the EA is running on. And how do you think the current price is different from the "real" price ? I got you confused, sorry, I just didn't mean it that way. You can use MarketInfo() to retrieve the current price for any symbol. What is Ask, what is Bid? Thanks, I'll see when I'm older )) [Deleted] 2012.06.26 19:20 #2129 r772ra: Thanks - I'll keep chewing on the code evgens 2012.06.26 22:10 #2130 Hi guys, I haven't been here for a long time (1.5 years) please refresh my memory a bit. The thing is that with EAs the orders were placed with t/p and s/l, now I want to do without them, just under some conditions close the necessary orders. here is the code int clos(int mn) { int k=OrdersTotal(); for(int a=0;a<=k;a++) { if(OrderSelect(a,SELECT_BY_POS,MODE_TRADES)) { if(OrderMagicNumber()==mn) { if(OrderType()==OP_BUY || OrderType()==OP_SELL) int n=OrderTicket(); double l=OrderLots(); OrderClose(n,l,Ask,5,0); }}} return(0); } I don't close any order, I passed all of them, what's wrong? Any EA's that OPEN/CLOSE [ARCHIVE] Any rookie question, [WARNING CLOSED!] Any newbie 1...206207208209210211212213214215216217218219220...632 New comment
I want to write test results (transactions) to a file after testing
I put the tofile () function in the deinit() block (it writes after the work is finished)
does not work, it records only the headerbut the function itself
So can you tell me which function returns the current price?
You don't have the guts?
That's something! I'm not that clever, and I wouldn't have guessed it in Russian either.
I want to write test results (transactions) to a file after testing
I put the tofile () function in the deinit() block (it writes after the work is finished)
does not work, it writes only the headerbut the function itself
You don't have the guts?
It's just a "Bid" for an open order. Right? It shows me the real price. Or is this going to be a problem later on?
It is simply "Bid" for an open order. Right? It shows me the current price. Or is there a problem with it later?
It is not the Bid for the "open order", but the Bid for the chart on which the EA is running.
How do you think the current price is different from the "real" price?
You can use MarketInfo() to retrieve the current price for any symbol. It's either Ask or Bid.
It's not the Bid for "open order", it's the Bid for the chart the EA is running on.
And how do you think the current price is different from the "real" price ?
I got you confused, sorry, I just didn't mean it that way.
You can use MarketInfo() to retrieve the current price for any symbol. What is Ask, what is Bid?
Thanks, I'll see when I'm older ))
Thanks - I'll keep chewing on the code
Hi guys, I haven't been here for a long time (1.5 years) please refresh my memory a bit.
The thing is that with EAs the orders were placed with t/p and s/l, now I want to do without them, just under some conditions close the necessary
orders.
here is the code
int clos(int mn)
{ int k=OrdersTotal();
for(int a=0;a<=k;a++)
{ if(OrderSelect(a,SELECT_BY_POS,MODE_TRADES))
{ if(OrderMagicNumber()==mn)
{ if(OrderType()==OP_BUY || OrderType()==OP_SELL)
int n=OrderTicket();
double l=OrderLots();
OrderClose(n,l,Ask,5,0);
}}}
return(0);
}
I don't close any order, I passed all of them, what's wrong?