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

 
Noterday >>:

Вот тест с 1 марта по 20 мая по EURUSD

А это тест с 1 марта по 20 мая по GBPUSD

Вывод: фунт продержался дольше)))))

Tested, results are similar, good start and a "great" loss on trend reversal on a set of poses. You need to limit your losses with stops. It didn't work for me, that's why I posted it.
 
Minodi >>:
Тестил, результаты аналогичны, хороший старт и "замечательный" слив на развороте тренда при наборе поз. Нужно ограничить потери путем стопов. У меня не вышло. для этого и выложил.

Guess three times why there are no stops in the EA from the beginning?

The answer is to allow you to sit out a deep drawdown in the hope of a price comeback.

Next question, what happens if we add stops?

Answer: after limiting the losses, the "wonderful" plummet will spread over history and we will get a steadily falling balance line.

Summary: old Archimedes was no fool, leverage is a double-edged sword.

 
artmedia70 >>:
Интересные индюкаторы... На основе скользящих средних? Где можно "посчупать" ? А то я на М5 устал биться с лосями... Бодаются гады...

Not just interesting, but quite a workable option!

No - moving averages are just an auxiliary tool. The decision is made in an integrated way, based on aggregate factors.

Where can I get one? I can sell it for 30 quid. The kit will include three indicators (those on the screenshot + 1, which is not there), two or three templates and explanations how to use it all.

Warning!!! Everything can be explained very clearly. But not the fact that another person will be able to successfully use this or that trading system. You see, if I give you now a first-class Spanish guitar, it is not a fact that you will play it masterfully.

There will always be moose. The trick is how to manipulate the opening positions.

Further discussion in private.

 
granit77 >>:

Догадайтесь с трех раз, почему в советнике изначально не предусмотрены стопы?

Ответ: чтобы дать возможность пересидеть глубокую просадку в надежде на возврат цены.

Следующий вопрос, а что будет, если прикрутить стопы?

Ответ: после ограничения потерь "замечательный" слив размажется по истории и мы получим стабильно падающую линию баланса.

Резюме: старик Архимед был не дурак, рычаг - палка о двух концах.


Deep drawdowns are for investors, some may overstay their welcome, but I prefer limited losses and re-entry.

 
Minodi >>:

Глубокая просадка - это для инвесторов, возможно кто то и пересиживает, а я предпочитаю ограниченные потери и перезаход.

For EAs that are overextended, limiting losses is a guaranteed failure, because they are overextended due to inaccurate inputs. By limiting the drawdown, you take away the crutch from the lame one, and he will immediately sit on his ass.

However, no one will convince you unless you try it yourself.

 
Guys, please add fractal trailing and the ability to choose the time of operation. Please.
Files:
ema_wma.mq4  5 kb
 
mydone >>:
Ребята пожалуйста прикрутите сюда трейлинг по фракталам и возможность выбирать время работы. Пожалуйста.

you have the wrong branch.
 

Question on ObjectCreat:

While mastering such a tricky thing as Object Creation, I faced a problem with a simple example. So, I made a simple bar coloring tool (bar body + close). Please tell me why it doesn't draw anything. What is the error:

int init()
  {

   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
 {
   int limit;
   string bar, close;
   int counted_bars=IndicatorCounted();
   if(counted_bars<0) counted_bars=0;
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
       for(int i=limit;i>=0;i--) 
 
{
   ObjectCreate("bar", OBJ_TREND, 0,Time[i],High[i],Time[i],Low[i]);
   ObjectSet   ("bar", OBJPROP_COLOR, Yellow);
   ObjectSet   ("bar", OBJPROP_STYLE, STYLE_SOLID);
   ObjectSet   ("bar", OBJPROP_BACK,  false);    
   ObjectSet   ("bar", OBJPROP_RAY,   false);
   ObjectSet   ("bar", OBJPROP_WIDTH, 2);
 
   ObjectCreate("close", OBJ_TREND, 0,Time[i],Close[i],Time[i]+Period()*60,Close[i]);
   ObjectSet   ("close", OBJPROP_COLOR, Yellow);
   ObjectSet   ("close", OBJPROP_STYLE, STYLE_SOLID);
   ObjectSet   ("close", OBJPROP_BACK,  false);    
   ObjectSet   ("close", OBJPROP_RAY,   false);
   ObjectSet   ("close", OBJPROP_WIDTH, 2);
} 
    //----
   return(0);
  }
 
Look at the code https://www.mql5.com/ru/forum/125663/page4#322819 and tell me what's wrong, I'm not very good at programming, but I want to make it work.
 
Azerus >>:

Вопрос по ObjectCreat:

Осваивая такую хитрую штуковину, как Создание объекта, на простейшем примере столкнулся с проблемой. Итак, наваял простейший расскрашиватель баров (тело бара + закрытие). Подскажите, почему ничего не рисует. В чем ошибка:


Variables are declared

string bar, close;

They are not initialized with a value.

Next. At each iteration of the loop you try to create a different object with the same name as the previous object. The terminal recognizes objects by their names, so the object names must be different.

The ObjectCreate() function is of type bool. You haven't done error handling code, so we cannot figure out why the objects are not drawn. The correct code would be type:

string bar, close;
for(int i=limit;i>=0;i--){
  bar="bar"+i;
  if(!ObjectCreate(bar, OBJ_TREND, 0,Time[i],High[i],Time[i],Low[i])){
    Print("Ошибка № ",GetLastError()," при создании объекта bar");
  }
// -------- остальной код -------------
}

Although, with your string limit=Bars-counted_bars; initializing variable with bar="bar "+i; won't help. I've specified it only to show that in loop, object names can be generated automatically.

Also before creating an object it would be nice to check its existence. If the object already exists, why bother creating it again?

Reason: