Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 723

 

This question arises - the Expert Advisor creates an array for which deinit() did not provide for ArrayFree. Does it mean that with each subsequent test, the Expert Advisor will take more and more memory for this array? Or will the memory be released somehow at the end of each testing cycle?

 

Not many people will understand me, I just don't know how to ask in other words.

How do you think about an EA morally - "if you opened an order yesterday, it would be closed today with a loss"?

I mean, the Expert Advisor would not physically open the order, but would see what would happen.

How else could I ask? In short, we need the Expert Advisor to test the last 10 days when it is working on a demo or real account.

If anyone is wondering what kind of expert I try to write: Many people know about the probability theory (for those who do not know, a coin will one day fall on the other side)

For example, I ran on a pair of eurodolls with a take and a stop at 1000 points over 7 years, ie 1 bet 0.01 if loss, the next bet 0.02 if a loss, 0.04, well generally understand what I mean,

so for 7 years max losses in a row is 9. i.e. on 10 rate 99% profitable deal. but on 10 deal need 2.56 lots.

The idea is not to do for example the first 4-5 trades in vain, then already with 6 deals I can start 0.01

So, for those who understand me, how can I make my Expert Advisor morally as if it was making bets (but it was not making them in real life)?

What functions can be used?

 
gheka:

Not many people will understand me, I just don't know how to ask in other words.

How do you think about an EA morally - "if you opened an order yesterday, it would be closed today with a loss"?

I mean, the Expert Advisor would not physically open the order, but would see what would happen.

How else could I ask? In short, we need the Expert Advisor to test the last 10 days when it is working on a demo or real account.

If anyone is wondering what kind of expert I try to write: Many people know about the probability theory (for those who do not know, a coin will one day fall on the other side)

For example, I ran on a pair of eurodolls with take and stop 1000 point 7 years, ie 1 bet 0.01 if loss, the next bet 0.02 if a loss, 0.04 well generally understand what I mean,

so for 7 years max losses in a row is 9. i.e. on 10 rate 99% profitable deal. but on 10 deal need 2.56 lots.

The idea is not to do for example the first 4-5 trades in vain, then with 6 deals I can start 0.01

So, for those who understand me, how can I make my Expert Advisor morally as if it was making bets (but it was not making them in real life)?

What functions can be used?

You've come to understand the adaptivity property of an EA. It is achieved by dynamically optimizing its parameters.

The implementation is simple: at the same time with writing the Expert Advisor, you write its model as an indicator or as a function. The main thing - the model should work much faster than the Expert Advisor.

 
tara:

You have come to understand the adaptability property of an EA. It is achieved by dynamically optimising its parameters.

The implementation is simple: at the same time with writing the Expert Advisor, you write its model as an indicator or function. The main thing - the model should work much faster than the Expert Advisor.

And it seemed to me that it needs virtual positions...
 
artmedia70:
It seemed to me that he needed virtual positions...
I thought so, too. :)
 
gheka:
...

The idea is not to make the first 4-5 trades for nothing, then on the 6th trade I can start with 0.01.01.

The idea is not to make for example first 4-5 trades in vain, then already with the 6th trade I can start 0,01

...

And I had 30 losses in a row, so the first 25 trades should be excluded somehow. And since this is a coin simulator, losses may occur more than 100 times in a row. And the worst thing is that even if there is enough money to cover all losing trades and you finally get a win at the 101st time - alas, the player has only got back what he lost plus a small bonus of a couple of kopecks on top. Is it worth it?

Example - first bet is 1 coin and each time we raise the bet twice if a coin goes tails; we take the winnings when the coin finally drops heads:

-2^0-2^1-2^2-2^3-2^4-2^5-2^6-2^7-2^8-2^9-2^10+2^11=3

Barely beat the loss of -2^0-2^1-2^2-2^3-2^4-2^5-2^6-2^7-2^8-2^9-2^10=-2045 coins, won only 3 coins and so on indefinitely while there is money ...

 
Good afternoon, could you please advise me if I installed MetaTrader 4 and there is no connection (( maybe a proxy is closed at work or something else, who knows, help me, what can I do. The thought that the admin at work will allow me to install is not real (
 

Good afternoon.

Gentlemen, is there any way to find a formula for calculating the required lot size if there is only a cost per point in the known ones?

 

Connoisseurs! Help me simplify an expression:

Nn = (n+MathMax(n-1,0)+MathMax(n-2,0)+MathMax(n-3,0)+MathMax(n-4,0)); //Что заменяет: см. ниже!
//if(n==1) Nn = 1; if(n==2) Nn = 3; if(n==3) Nn = 6; if(n==4) Nn = 10; if(n==5) Nn = 15;

But without a loop! With a loop it's easy, but it's inconvenient to insert it in a condition. Thanks a lot for sure! ;)

 
borilunad:
If I understand the problem correctly.
int n,Nn;
switch(n)
  {case 1:Nn=1;break;case 2:Nn=3;break;case 3:Nn=6;break;case 4:Nn=10;break;case 5:Nn=15;break;default :Nn=0;}
It is unclear where n should be taken from...
Reason: