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

 
walker_ >>:

Так просто? понял, Спасибо!

А как с помощью советника создать шаблон?

Elementary...

Take any current template, throw in and/ or leave what you need, and click "save as...".

 

I saw a digital filter in one EA from codbase and decided to add it to my EA.
I changed the signal to open positions to this one:

bool Digit_filter()//цифровой фильтр 
{
		OpenBuy = false;
		OpenSell = false;

 	   double Filter1 = iCustom(Symbol(), 0, "Figure", 0, 1);
	   double Filter2 = iCustom(Symbol(), 0, "Figure", 2, 1);
	   double Filter3 = iCustom(Symbol(), 0, "Figure", 3, 1);
	
	
	if( Filter1 > Filter3 && Filter2 > Filter3)
   	{
	   	CanOpenSell = true;
	   }
	if( Filter1 < Filter3 && Filter2 < Filter3)
   	{
   		CanOpenBuy = true;
   	}

        if( CanOpenBuy) 
   	{
	   	CanOpenBuy = false;
	   	OpenBuy = true;
	   	return( OpenBuy);
   	}
	if( CanOpenSell)
   	{
	   	CanOpenSell = false;
	   	OpenSell = true;
   		return( OpenSell);
   	}

}

The drawdown seems to have decreased.
I do not fully understand the principle of this filter. So, if anyone knows, please explain how it works.
Many thanks in advance.



Files:
figure_1.mq4  9 kb
 
walker_ >>:

Так просто? понял, Спасибо!

А как с помощью советника создать шаблон?


I hang the indicators I want and save the template with the name tester.

When I start the tester, they start working.

 
ellizii >>:

Доброй... Ночи.

Суть проблемы в следующем:

Имеется советник, но функция OrderClose() в нем не работает. В чем причина никак не пойму. Заранее благодарен за помощь.

There is no OrderClose() in the EA, as it is supposed to close the order at TakeProfit.

 

Dear Programmers and not only, could you please give me a link or code how to make a trailing stop on the previous day's candle depending on the order (buy/sell)?


Please write in a private message

 
avatara >>:


я вешаю нужные индикаторы и сохраняю шаблон с именем tester.

При запуске тестера они начинают работать.


So no, creating a template is elementary, the question is how to make the template be created by the advisor when it first runs
 

walker_ писал(а) >>

So no, creating a template is elementary, the question is how to make the template be created by the Expert Advisor when it first runs

You can do practically everything. But what for? The tester has a solution, and you don't use EAs on demo or real sites so often that you are too lazy to add the ready template manually. The energy is better used for peaceful purposes and this "improvement" will not add profit.

 
granit77 >>:

Сделать можно практически все. Но зачем? С тестером решение есть, а на демо и реал Вы не так часто ставите советники, чтобы лениться вручную накинуть готовый шаблон. Энергию лучше использовать в мирных целях, а это "усовершенствование" профита не добавит.


So how do you do it? I couldn't find it in the documentation. But there is interest.
 
granit77 >>:

Сделать можно практически все. Но зачем? С тестером решение есть, а на демо и реал Вы не так часто ставите советники, чтобы лениться вручную накинуть готовый шаблон. Энергию лучше использовать в мирных целях, а это "усовершенствование" профита не добавит.


So how do you do it? I couldn't find it in the documentation. But there is interest.
 

Help a beginner.

Have a look at the textbook! very grateful to the creators. On the whole, the language is similar to C. But I haven't found any example of a simple program. Please send me the code of a program that would simply open an order if the price is higher than the level I have specified. I would be very grateful!

Reason: