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

 
1. The iron rule is to normalise all prices!
2. Stoploss and takeprofit for Buy count from Bid
3. Stop Loss and Take Profit for Sell, counting from Ask
4. Check for StopLvl
 
sergeev писал(а) >>
1. The iron rule is to normalise all prices!
2. StopLoss and TakeProfit for Buy counts from Bid
3. Stop Loss and Take Profit for Sell, counting from Ask
4. Check for StopLvl


1. OK
2. и 3. OK
4. don't know how to explain.

Result 4107 in the tester

 
baltik >>:


1. ОК
2. и 3. ОК
4. не знаю как прявазать

Результат 4107 в тестере выдает

You write a bool function () to check if the difference between the price and the set StopLoss is higher than the StopLoss (from MarketFox).

then true otherwise false.

Then before opening an order, check if(function()) and open the order.

 
What the condition would look like:
If stochastic crosses from bottom to top of level 20
And if stochastic crosses from top to bottom the level of 80?
Please write the code!
 
Kogalym >>:
Как будет выглядеть условие:
Если стохастик пересечет снизу вверх уровень 20
И если стохастик пересечет сверху вниз уровень 80 ???
Напишите код пожалуйста!

double Stoch_1 = iStochastic(Symbol(),Period(),K,D,Slowing,Mode,0,MODE_MAIN,1);
double Stoch_2 = iStochastic(Symbol(),Period(),K,D,Slowing,Mode,0,MODE_MAIN,2);

if(Stoch_1 > 20 && Stoch_2 <= 20){} // Снизу - вверх уровень 20
// до 2-го сам ...
 
sergeev писал(а) >>
1. The iron rule is to normalise all prices!
2. StopLoss and TakeProfit for Buy counts from Bid
3. Stop Loss and Take Profit for Sell, counting from Ask
4. Check for StopLvl


Steps 2 and 3 are incorrect. Right: Stop Loss and Take Profit for buy set off from Ask, Stop Loss and Take Profit for sell set off from Bid.
The check is simple. Calculate what gain, if takeprofit has triggered, you will get with your variant. It will not be equal to TakeProfit in points. And it will be exactly the same in the proposed variant.
 
StatBars >>:

Thank you!

 
I have a problem, and I can't figure out what it is, don't kick me.
I have a standard MACD, I want to mark all column peaks in the indicator (with icons), here is the code:
 for(i=0; i<limit; i++)
   {        
      if(MMACD1[i+1] > MMACD1[i+2] && MMACD1[i+1] > MMACD1[i])
         MAX[i+1] = MMACD1[i+1];
      
      if(MMACD1[i+1] < MMACD1[i+2] && MMACD1[i+1] < MMACD1[i])
         MIN[i+1] = MMACD1[i+1];
   }
Thus I have drawn all extrema in the indicator. Everything is OK, BUT!
When I use the Print function to print the values of all of the peaks found at
for(i=0; i<limit; i++)
   {
    if (MAX[i+1] != EMPTY_VALUE)
        Print (MAX[i+1]);
   }
this is what comes out:
2010.03.15 21:04:52     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:52     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:47     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:47     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:46     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:46     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:45     MACD_1va+data EURUSD,M30: 2147483647
2010.03.15 21:04:45     MACD_1va+data EURUSD,M30: 2147483647
I think 2147483647 are zeros or empty values?
 
Noterday >>:
... Я так понимаю что 2147483647 это нули или пустые значения?
2147483647 = EMPTY_VALUE 0x7FFFFFFFF Default value, pointer to empty value. Used in custom indicators.
But why your code doesn't work, I don't understand.
 

Good evening!

Silly and simple question, I guess, a superficial search didn't help. I am testing an EA, I change its code, but I don't change the tester parameters - symbol, model, date interval and TF remain unchanged. At every start the *.fxt file in the folder \MetaTrader 4\tester\history\ is generated anew, despite the fact that it doesn't seem to need to be generated each time, as the testing parameters are unchanged. As a result, I lose time on each run. Please, advise, how can I avoid regeneration?

Thank you.

Reason: