Questions from a "dummy" - page 98

 
uncleVic:

Question 1: ALL Standard Library classes that provide access to indicator and timeseries data require "refreshing" them (the data) before using them.

Write it this way (in simplified version):

Question 2. Other.

THANK YOU
 

I wanted to build Fibo Time Zone with two levels, but not the first two, but the 5th and the 8th. In the terminal all this can be manually removed/added through the settings window, but the software is not quite right. At the most I've come close to, it's adjusting the 5th and 8th levels with descriptions "0" and "1" for some reason; more obvious code variants led to even more horrible results. What am I doing wrong?

void OnStart()
  {
   string name="FTZ";

   datetime startTime1=D'2009.07.08 18:00:00';
   datetime endTime1=D'2009.11.03 12:17:00';

   double startPrice1=0.61930;
   double endPrice1=0.70948;

   ObjectCreate(0,name,OBJ_FIBOTIMES,0,
                startTime1,startPrice1,
                endTime1,endPrice1
               );
   ObjectSetInteger(0,name,OBJPROP_LEVELS,2);
   ObjectSetDouble(0,name,OBJPROP_LEVELVALUE,0,5);
   ObjectSetDouble(0,name,OBJPROP_LEVELVALUE,1,8);
  }
 
Hello, why does it say Market is closed on my demo account or is it just me or is it everybody?
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете - Документация по MQL5
 
Mixasik28:
Hello, why does it say Market is closed on my demo account or is it just me or is it everybody?
What day of the week is it? :) You can't trade on weekends because the market is closed.
 
x100intraday:

I wanted to build Fibo Time Zone with two levels, but not the first two, but the 5th and the 8th. In the terminal all this can be manually removed/added through the settings window, but the software is not quite right. At the most I've come close to, it's adjusting the 5th and 8th levels with descriptions "0" and "1" for some reason; more obvious code variants led to even more horrible results. What am I doing wrong?

There's a bit to add. Like this:

//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
   string name="FTZ";

   datetime startTime1=D'2012.01.11 09:00:00';
   datetime endTime1=D'2012.01.03 12:00:00';

   double startPrice1=0.61930;
   double endPrice1=0.70948;

   ObjectCreate(0,name,OBJ_FIBOTIMES,0,startTime1,startPrice1,endTime1,endPrice1);
   
   ObjectSetInteger(0,name,OBJPROP_LEVELS,2);
   ObjectSetDouble(0,name,OBJPROP_LEVELVALUE,0,5);
   ObjectSetDouble(0,name,OBJPROP_LEVELVALUE,1,8);
   ObjectSetInteger(0,name,OBJPROP_SELECTABLE,true);
   ObjectSetInteger(0,name,OBJPROP_SELECTED,true);
   ObjectSetString(0,name,OBJPROP_LEVELTEXT,0,"5");
   ObjectSetString(0,name,OBJPROP_LEVELTEXT,1,"8");
  }
 
tol64:

A little something needs to be added. There you go:

Thank you. Liked it.
 

Trend line, angle of inclination. What do the degrees show?

...рядом с конечной точкой будут показываться вспомогательные параметры:
расстояние по оси времени от начальной точки, расстояние по оси цен от начальной точки,
угол наклона от горизонтальной линии проведенной через начальную точку.

The upd from the (pre-drawn) horizontal line draws more correctly, but it still doesn't look like a protractor. Or one of the two.

Compared to the trend line by angle

Not clear.

 
Silent:

Trend line, angle of inclination. What do the degrees show?

Ratio of points (on a price scale) to bars (on a time scale).
 

Hello.

I have created the following trade request:

ZeroMemory(mrequest);
mrequest.action = TRADE_ACTION_DEAL; // immediate execution
mrequest.price = NormalizeDouble(latest_price.ask,_Digits); // latest price ask
mrequest.sl = NormalizeDouble(latest_price.ask - STP*_Point,_Digits); // Stop Loss
mrequest.tp = NormalizeDouble(latest_price.ask + TKP*_Point,_Digits); // Take Profit
mrequest.symbol = _Symbol; // symbol
mrequest.volume = Lot; // number of lots to trade
mrequest.magic = EA_Magic; // Magic Number
mrequest.type = ORDER_TYPE_BUY; // buy order
mrequest.type_filling = ORDER_FILLING_AON; // order type - all or nothing
mrequest.deviation=100; // slippage from the current price
//----send order

OrderSend(mrequest,mresult);

An error occurs during the order execution, however, and the following message is displayed in the log.

failed instant buy 1.00 EURUSD at 0.00000 sl: -0.02000 tp: 0.02000 [Invalid stops]

Why is the terminal showing zero price?

I am also logging the current price:

Alert("current price=",latest_price.ask);

and I see a message in the log with the current price as normal:

Alert: current price=1.016134511377497e-297

What is the problem?

Thank you.

Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5
 
Alfff:


...

What is the problem?

If 1.016134511377497e-297 is written as a fraction, it looks like this
1.01613~
________
    297
  10

If the accuracy in _Digits (e.g. 5 digits) is zero
Reason: