Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 438

 
How do I get MODE_TICKVALUE in MQL5?
 
Roman Sharanov:
How do I get MODE_TICKVALUE in MQL5?
SymbolInfoDouble(symbol,SYMBOL_TRADE_TICK_VALUE)
 
Roman Sharanov:
How do I get MODE_TICKVALUE in MQL5?
F1 Help -Standard constants, enumerations and structures-Environment state -Environment state -Tool information
void OnStart()
  {
Alert("TICK_VALUE = ",SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE));               //Значение SYMBOL_TRADE_TICK_VALUE_PROFIT 
Alert("TICK_VALUE_PROFIT = ",SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE_PROFIT)); //Рассчитанная стоимость тика для прибыльной позиции
Alert("TICK_VALUE_LOSS = ",SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE_LOSS));     //Рассчитанная стоимость тика для убыточной позиции
   
  }

//  Как то так
 
Hey, would it be possible to let the indicator view the 28 pairs for a breakout with one chart?
 
esmaster:

Thinking like this, let's take a MA with a period of 1 on the closing price and it will show us the closing price of the day? But then it should be like this on the real as well... Let's rejoice and get rich!!! Or is it different in real life, and the tester is stupid?
There is a small error in your reasoning - at any time and for any period Close[0] = Bid

void OnStart()
{
   Alert(iMA(NULL, PERIOD_M1, 1, 0, MODE_SMA,PRICE_CLOSE,0),
   "   ",iMA(NULL, PERIOD_H1, 1, 0, MODE_SMA,PRICE_CLOSE,0),
   "   ",iMA(NULL, PERIOD_D1, 1, 0, MODE_SMA,PRICE_CLOSE,0),
   "   ", Bid );

   Alert("   M1            H1            D1          Bid");
}
 

Good afternoon, there is such an indicator"$hah+"(without open code), buffers defined correctly, please advise why the function does not work?

//возвращает данные зеленого буфера 
  double Greens(int shift)
{
  double buf = iCustom(NULL, 0, "$hah+", 0, 0, shift);
  return(buf);
}
  //возвращает данные красного буфера 
double Reds(int shift)
{
  double buf = iCustom(NULL, 0, "$hah+", 0, 1, shift); 
  return(buf);
}
  //возвращает данные черного буфера 
  double Blacks(int shift)
{
  double buf = iCustom(NULL, 0, "$hah+", 0, 2, shift);
  return(buf);
}
bool SellSignal()
{
  //если последний столбик красный, а предпоследний зеленый
  if(Reds(1)!=0&&Blacks(2)!=0) return(true);

  else return (false);
}
bool BuySignal()
{
  //если последний столбик зеленый, а предпоследний красный
  if(Greens(1)!=0&&Blacks(2)!=0) return(true);

  else return (false);
}
 
d1w4m3:

Good afternoon, there is such an indicator"$hah+"(without open code), buffers defined correctly, please advise why the function does not work?

If the data window is empty, it is an empty value, which can be 0 or EMPTY_VALUE, which ... Try it like this

double Greens(int shift)   //возвращает данные зеленого буфера 
{
  return iCustom(NULL, 0, "$hah+", 0, 0, shift);
}
  
double Reds(int shift) //возвращает данные красного буфера 
{
  return iCustom(NULL, 0, "$hah+", 0, 1, shift); 
}

double Blacks(int shift) //возвращает данные черного буфера 
{
  return iCustom(NULL, 0, "$hah+", 0, 2, shift);
}

bool SellSignal()   //если последний столбик красный, а предпоследний зеленый
{
  if(Reds(1)!=EMPTY_VALUE && Blacks(2)!=EMPTY_VALUE) return true;
  return false;
}

bool BuySignal()    //если последний столбик зеленый, а предпоследний красный
{
  if(Greens(1)!=EMPTY_VALUE && Blacks(2)!=EMPTY_VALUE) return true;
  return false;
}

Is the indicator this one?

 
Hello all! I can't find oil in the list of charts. There are only currencies. Help me find it or tell a newbie where to load it. Thanks in advance.
 
Sergey:
Hello all! I can't find oil in the list of charts. There are only currencies. Help me find it or tell a newbie where to load it. Thanks in advance.

Try right-clicking on the symbols, symbol set, ... Or call your broker - maybe he has, maybe not

 
STARIJ:

If the data window is empty, it is an empty value, which can be 0 or EMPTY_VALUE, which ... Try it like this

Is the indicator this one?

I'm falling at my feet)))You should know how much time I spent on it. My eternal respect)
Reason: