Initial deposit size - what is it? - page 11

 
This is the case if there is not a single losing position.
 

I am preparing my EA for the forward test. In the picture you can see that the optimisation seems to have hit something (above). Does it make sense to keep racing or what?

 

How do I open a buy and a sell position at the same time? I mean, let's say I have a buy position, I want to add a sell position to it. MT4 says "not enough money". I do not see anything like that on my brokerage company web-site either. Lot 0.1, money $2000 francs, EUR.

?..

 
Swetten писал (а) >>

I am preparing my EA for the forward test. In the picture you can see that the optimisation seems to have hit something (above). Does it make sense to keep running it or what?

>> Yeah. That's weird. Observed this with a neural network.

I do not know what kind of Expert Advisor it is. I cannot say anything useful. But it seems that this TS is reversible.

Perhaps we should optimize it in some other way. Partial optimization: optimize one thing first, then the other. There are many variants.

Swetten wrote (a) >>

How to open simultaneously buy and sell positions? I.e., let's say, there is a buy position and I want to add a sell position to it. MT4 declares "insufficient funds". I cannot find anything similar on the brokerage company web-site. The lot is 0.1, the money is $2000 ff.

?..

>> all at once:

void OpenPoz () 
{ 
int ticket,err;
{
RefreshRates();
ticket=OrderSend(Symbol(),OP_BUY,Lots,Ask,slippage,0,0,comment,magic,0,Green);
err=GetLastError(); 
if(err!=0){Print("Ошибка при попытке поставить ордер: ",GetLastError());} 
else {Print("Ордер на покупку поставлен : ",OrderOpenPrice(),OrderLots());} 
RefreshRates();
ticket=OrderSend(Symbol(),OP_SELL,Lots,Bid,slippage,0,0,comment,magic,0,Red);
err=GetLastError(); 
if(err!=0){Print("Ошибка при попытке поставить ордер: ",GetLastError());} 
else {Print("Ордер на продажу поставлен : ",OrderOpenPrice(),OrderLots());} 
}
return(0);
}

But it's strange about the lack of money. There should be enough...
 
meta-trader2007 писал (а) >>

Partial optimisation: first optimise one thing, then another. There are many options.

Yeah. How? I want to use auto-optimizer, but I have 16 parameters. I came up with this: break it into 4 functions by 4 parameters and optimize (I put a counter, for example, for 10 minutes or the first 256 results, do not matter, for each of the functions, not to contemplate this optimization for days). Question: How can I disable them one by one? In other words, their call in the Expert Advisor now goes like this

Function01();

Function02();

Function03();

Function03();

And how to build the structure If we optimize it, then Function01()

or step01:

Function01() tru;

Function02() fals;

Function03() fals;

Function03() fals;

step02:

Function01() fals;

Function02() fals;

Function03() fals;

Function03() fals;

step03:

Function01() fals;

Function02() fals;

Function03() fals;

Function03() fals;

step04:

Function01() fals;

Function02() fals;

Function03() fals;

Function03() тру;

Finished optimizing -- set parameters and all functions = true?

 

Can you tell me if opening an order

ticket = OrderSend(Symbol(), OP_BUY, lots, Ask, 3, Bid - SLBuy * Point, 0, "TestMTS",   MagicNumber, 0, CLR_NONE);

is impossible (MT4 reports lack of money), can it be closed by opening a counter order using OrderCloseBy()

ticket = OrderCloseBy(Symbol(), OP_BUY, lots, Ask, 3, Bid - SLBuy * Point, 0, "TestMTS",   MagicNumber, 0, CLR_NONE);

???

 

Again, a question about MA.

Sample:

double iMA(string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift)

My code:

дубль  переменная;
переменная = iMA(NULL, PERIOD_M1, 233, 0, MODE_SMA, PRICE_CLOSE, 4);

I.e.: read from the current window/symbol, M1 period only, 233 averaging, no shift, Simple MA mode, calculate from close prices, take data from the fourth bar (i.e. the fifth from the current one). Right?

Question: Where do we find numerical values for MODE_SMA, PRICE_CLOSE? I.e., for example, SMA = 0, EMA = 1, etc.? And the same for price?

P.S. Is it true that if I hang the EA on the H4 TF, it will still see M1?

 
Swetten писал(а) >>

...Question: where do I find the numerical values for MODE_SMA, PRICE_CLOSE? I.e. e.g. CMA = 0, EMA = 1 etc.? And the same for price?

P.S. Is it true that if I hang the EA on the H4 TF, it will still see M1?

In the MetaEditor

MQL4 Reference - Standard constants - Price constants

MQL4Reference - Standard constants - Moving Methods

P.S. RIGHT!!!

 
Swetten >> :

Yeah. How? I want to use auto-optimizer, but I have 16 parameters. I came up with this: we divide 4 functions into 4 parameters and optimize them (for example, I'll set a counter for 10 minutes or the first 256 results, whatever, for each of the functions, so that I don't have to contemplate this optimization for twenty-four hours). Question: How can I disable them one by one? In other words, their call in the Expert Advisor now goes like this:

....

Finished optimisation -- set parameters and all functions = toot?

I am not engaged in auto-optimization, so I cannot say how to do it better.

Swetten >> :

Please tell me if opening an order

impossible (MT4 reports lack of money), then it may be closed by opening a counter order using OrderCloseBy()

???

Actually, if it is impossible to open, then it simply will not open and there is no need to close anything.

Right.

//----
// MODE_SMA  0 Простое скользящее среднее 
// MODE_EMA  1 Экспоненциальное скользящее среднее 
// MODE_SMMA 2 Сглаженное скользящее среднее 
// MODE_LWMA 3 Линейно-взвешенное скользящее среднее 
//----
// PRICE_CLOSE    0 Цена закрытия 
// PRICE_OPEN     1 Цена открытия
// PRICE_HIGH     2 Максимальная цена 
// PRICE_LOW      3 Минимальная цена 
// PRICE_MEDIAN   4 Средняя цена, (high+low)/2 
// PRICE_TYPICAL  5 Типичная цена, (high+low+close)/3 
// PRICE_WEIGHTED 6 Взвешенная цена закрытия, (high+low+close+close)/4 
//----
 
Doesn't anyone know a sensible expert who "trades" or trades on ZigZag? I really need it!
Reason: