if(Hour()==9)OrderSend(.......);
Metatrader always deleted the Order due Expiration. But Expiration is 0.
Only 1 Order at the same time, but every Minute 4 orders are opened.
#property copyright "martin80"
#property link ""
//---- input parameters
extern double TakeProfit=80.0;
extern double Lots=1.0;
extern double TrailingStop=25.0;
extern double StopLoss=30.0;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
int total=OrdersTotal();
if(Hour()==9)
{
if (total==0)
{
OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+30*Point,3,Ask-30*Point,Ask+TakeProfit*Point,"My Ordercommentx",0,Red);
total=1;
}
}
return (0);
}
return (0);
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use