[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 394

 
chief2000 >>:Но это в теории, а на практике файл не создается.

copied the code into the new EA, the file in the tester\files folder is created normally.

 
splxgf >>:

скопировал код в новый советник, файл в папке tester\files создается нормально.

Funny - I was expecting to see it in the "experts\files" folder, but didn't know about the "tester\files" at all (and the file was actually created there).

Thank you!

 
advise a couple of reliable eur/usd advisors for 1000 buck 30 daily and more trades
 
#property copyright "D!m@n"
#property link      "http://open-forex.org"

extern double Lots=1.0;
extern int Slippage = 1;
extern int X;
extern int Y;
extern int Magic_number;

int a,MR,z,flag,flag2,bar,flag3;
double LotS,balance;
string sig,sig2;
bool B;

//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
bool NewBar()
{
B=false;
if( bar!=iBars(Symbol(),PERIOD_D1))
{
bar=iBars(Symbol(),PERIOD_D1);
B=true;
}
return( B);
}

int start()
  {
  //-------------Обработка ордеров----------------------------
  z=0;
  for ( a=0; a<OrdersTotal(); a++)
  {
  OrderSelect( a, SELECT_BY_POS, MODE_TRADES);
  if (OrderMagicNumber()== Magic_number)
  {
  z=1;
  }
  }
  //-----------------------------------------------------------
    
  //---Блок мартини-------------------------------------------
  if (AccountBalance()> balance)
  {
  balance=AccountBalance();
  MR=0;
  LotS= Lots;
  }
  else if (AccountBalance()< balance)
  { 
  balance=AccountBalance();
  MR=1;
  LotS= LotS*2;
  }
  //----------------------------------------------------------
    
  //----Получение сигналов------------------------------------
  sig="not";
  if(iOpen(Symbol(),PERIOD_H1,0)-iOpen(Symbol(),PERIOD_H1,3)> X*Point&&iOpen(Symbol(),PERIOD_H1,0)>iMA(Symbol(),PERIOD_H1, Y,0,MODE_SMA,PRICE_MEDIAN,1)) sig="+";
  if(iOpen(Symbol(),PERIOD_H1,3)-iOpen(Symbol(),PERIOD_H1,0)> X*Point&&iOpen(Symbol(),PERIOD_H1,0)<iMA(Symbol(),PERIOD_H1, Y,0,MODE_SMA,PRICE_MEDIAN,1)) sig="-";
  
  flag3=0;
  if ( flag2>6) flag3=1;
  if ( NewBar())
  {
  flag2=0;
  flag3=0;
  }
  //----------------------------------------------------------
  
    
  //-- открытие позиции---------------------------------------
  if(TimeMonth(iTime(Symbol(),PERIOD_M1,0))!=12)
  {
  if ( sig=="+")
  {
  if( z==0)
  {
  OrderSend(Symbol(), OP_BUY, LotS, Ask, Slippage,Ask- X*Point ,Ask+ X*Point, "", Magic_number,0);
  }
  }
  
  if ( sig=="-")
  {
  
  if ( z==0)
  {
  OrderSend(Symbol(), OP_SELL, LotS, Bid, Slippage, Bid+ X*Point ,Bid- X*Point, "", Magic_number, 0);
  }
  }
  }
  
  //-----------------------------------------------------------------
   return(0);
  }
//+------------------------------------------------------------------+
Why does OrderSend error 130 appear when running an EA?
 
sammi61 >>:
посоветуйте пару надёжных советников по eur\usd что бы с 1000 бак 30 ежедневно делал и побольше сделок

If you can find it... drop me a line, too.

Thanks in advance.

 
granit77 >>:

Он предпочитает деньгами, обычно в размере депозита :))

А если есть что сказать, говорите, здесь Вам помогут избавиться от иллюзий, а может и найти рациональное зерно.

Thank you =) there is an illusion ...

The price movement has a wave nature! Move in a certain direction, then bounce back as Elliot, Fibonacci, etc. said.

So why not use Martingale?! The Martingale system can be improved! At each losing trade we do not just increase the lot, but at the same time open the opposite order, no matter which way the price moved we have profit from this, and the return of the lot to the initial stage is a matter of time!

I will give you an example!

Suppose we opened a Sell position 0.1
=>The price went up by 10 pips, so we open two orders,
1. sell lot 0.2 (increase by martingale)
2. Buy lot 0.1
=>Price has risen by 10 pips again,
1. Close Buy ( fix profit)
2. Open Sell lot 0.4
3. Open Buy lot 0.1
=> price went up again by 10 pips,
1. Close Buy ( Fix profit)
2. Open Sell lot 0.8
3. Open Buy lot 0.1
=> Price fell by 10 pips i.e. Price Price Price is TP triggered
1. Close all Sell(0.1\0.2\0.4\0.8)
2. Open Buy position 0.2 (increase the size of the previous Buy position, since the previous one was losing)
3. Open Sell lot 0.1

Well, 10 pips is just an example! This size will depend on the timeframe and the pair!

 

Kogalym, you count to ten... Up to 10 orders at a Sell loss, and the Bay closes will seem like an arithmetic error to you. And also, it would be good to know exactly how much for the Sell margin and the cost of the punt, so .... just in case ...

To correct the error, see MarketInfo( symbol(), 13 ... 33)

 
Night_Sun >>:

Kogalym, вы посчитайте до десяти... до 10 ордеров в убыток по Sell, и закрываемые Bay покажутся Вам арифметической погрешностью. И еще, хорошо бы точно знать сколько для Sell залога и стоимость пунтка, так ... на всякий случай ...

для исправления ошибки см. MarketInfo( symbol(), 13 ... 33)


OK, 10 Sell orders in 50 pips step => 50*10=500 pips =)

500 pips without a pullback?! I must have missed something if it is possible =)

The deposit may be partially compensated by opening a Buy order

I still could not find the error =(

 
Kogalym >>:
Почему при запуске советника выдает ошибку OrderSend error 130 ?

At a minimum, NormalizeDouble must be applied to all Ask, Bid, etc. in OrderSend. For example: NormalizeDouble(Ask-SL_Buy*PointX,Digits).

 
Kogalym, your X value is less than MarketInfo( symbol(), 14), so error 130. Here see.
Reason: