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

 
extern int MaxOrders = 5;  // внешняя

int Nn[];  // глобальная

int init()
  {
   string txt="";
   int i=0,temp=0;
   ArrayResize(Nn,MaxOrders+1);
   for(i=1;i<=MaxOrders;i++) 
     {
      temp+=MathMax(i-1,0);
      Nn[i]=temp;
      txt=StringConcatenate(txt,"\n",temp);
     }
   Comment(txt);
   return(0);
  }
 
artmedia70:
I thought it needed virtual positions...
Yeah, virtual.
tara:


The implementation is simple: at the same time as writing an EA, you write its model as an indicator,

good idea

 
valeryk:

Thank you very much! Trying it now, the result is affected, but it works! Will check all suggested! In principle, I can limit myself to a constant maximum, and the DC will not allow it! :))
 
evillive:

And I've had 30 losses in a row, which means that the first 25 trades had to be ruled out somehow. And since this is a coin simulator, there may be more than 100 losses 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 got back 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 forever, as long as there is money...

30 losses, it depends on what sequence to put sell and buy, I do not mean: always put on red or black.

The chart is not predictable, orders may be placed in such a nice sequence that the entire market history cannot be changed, got it?

"And since it's a coin simulator, the losses can happen more than 100 times in a row. "" - and if you guess like this, tails, heads, heads, tails, heads, - how do you think a coin will accurately make you a loss

And to make it 100 times, you'll be out of the picture.

"And the worst thing is that even if there is enough money to cover all losing trades and finally at the 101st time turned out a win - then alas, the player has only got back what he lost plus a small bonus of a couple of kopecks on top.

 

Help me to understand the opening times of the trading exchanges, is this correct ?

Trading sessionOpening Time (Moscow)Closing Time (Musc)
Far East / Asian
(Singapore, Tokyo, Hong Kong)
04.0012.00
Continental Europe
(Paris, Zurich)
9.0017.00
European
(London)
10.0018.00
American
(New York, Chicago)
16.0000.00
Pacific
(Wellington, Sydney)
00.009.00



or better look at this sitehttp://stocktime.ru/ and just sum up your timezone...for example the current Kyiv timezone +3....and you can see the differences in the start of the exchanges

 
artmedia70:
It seemed to me that it needed virtual positions...
As far as I'm concerned, I can't do without arrays, no matter how much I'd like to? eh, I'm no good with arrays :(
 

I'm trying to figure out how to work with arrays in the tutorial and documentation, but I'm not sure what to do. Please send me a simple function, for example how to memorize tick order or something? And then for Alert to report the number of the tick. For me, it would be easier to understand. It would be easier for me to understand. I have problems with abstruse Russian words in my manual :)

I started to study mql4 with simple Expert Advisor. And I've never read a textbook.

 
gheka:

I'm trying to figure out how to work with arrays in the tutorial and documentation, but I'm not sure what to do. Please send me a simple function, for example how to memorize the order tick or what? And then for Alert to report the number of the tick. For me, it would be easier to understand. It would be easier for me to understand. I have problems with abstruse Russian words in my manual :)

I started to study mql4 with simple Expert Advisor. But I've never read a textbook.

There is nothing abstruse there.

double arr[];

arr[0] = 300.0;
arr[1] = 254.0;
arr[2] = Bid;
Alert("В массиве arr под индексом 0 значение ", arr[0]; // 300
Alert("В массиве arr под индексом 1 значение ", arr[1]; // 254
// То-же самое для arr[2]
 
AlexeyVik:

There's nothing abstruse about it.

:) here I am ....... ! So why write such scary articles about arrays in textbooks?
 
evillive:

And I've had 30 losses in a row, which means that the first 25 trades had to be ruled out somehow. And since this is a coin simulator, the losses can happen 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

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, as long as there is money ...

Just don't think anything negative about me, for instance. I don't know how you got 30 losses, of course if I take 100 pips stops and takes, then I may have a 100 loss.

Here is my example of 1000 pips here and there, 50 orders in different places. Maximum number of losses of only one order 6 in 10 months. The chart does not trade further as the lots are limited

As for the brokers, my first deposit is 1000 quid, so the drawdown is a bit too much for me. If I exclude at least 4-5 losing orders, then I need at least 300-400 quid instead of 1000 Zelenium.

Reason: