MQL4 - automated forex trading   /  

Forum

Login | Register | Language: ru cn en
Buy financial books in MetaTrader Market and trade with confidence

Only 1 trade per 1 day

Back to topics list To post a new topic, please log in or register
avatar
32
Meta COT Project - New Horizons for CFTC Report Analysis in MetaTrader 4
The article is about the use of CFTC report data (Open Interest) in MetaTrader. The article describes the proposed META COT project in details, shows how to load and process the necessary information. The Expert Advisor included into the project will help us analyze the effectiveness of the concept presented in the article. Finally, we'll draw some conclusions and offer useful suggestions.
avatar
14179
RaptorUK 2011.08.03 21:15 #
 
rozirozi:
Pls write me code, thx
No !
avatar
172
serpentsnoir 2011.08.03 22:07 #
 

i think the question might have been " can someone direct me to a sample of code that shows how can I limit my ea to only one trade in a day?"

 
avatar
14179
RaptorUK 2011.08.03 22:30 #
 
serpentsnoir:

i think the question might have been " can someone direct me to a sample of code that shows how can I limit my ea to only one trade in a day?"

Ah I see . . . sorry, didn't realise ;-)

Try this: http://crum.be/1h

avatar
1
soldat0998 2011.08.04 04:51 #
 

#property copyright "Copyright ?2011, Soldat Software Corp." //6
#property link "http://492598710.qzone.qq.com/" //7

int MAGICMA; //11
int totaltrade;
int ticket;
int start()
{
MAGICMA = TIME_DATE;
int li_ret_0 = 0 ;

for (int l_pos_4 = 0; l_pos_4 < OrdersTotal(); l_pos_4++)
{
if (OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))
if (OrderMagicNumber() == MAGICMA)
li_ret_0 = 1;
else
totaltrade++;
}
if(totaltrade == OrdersTotal())
{
ticket=OrderSend(Symbol(),OP_BUY,0.1,Ask-25*Point,3,0,Ask+25*Point,"Dolan",MAGICMA,0,Green);
if(ticket>0)
{
if(OrderSelect(ticket,SELECT_BY_TICKET,MODE_TRADES)) Print("BUY order opened : ",OrderOpenPrice());
}
else Print("Error opening BUY order : ",GetLastError());
return(0);
}
return(0);
}

 
Back to topics list  

To add comments, please log in or register