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

 

Is it possible to display the icon in "future" bars? Apart from the application of fibo time lines.

I.e. it would be bars -1, -2 etc.



 
Ilmir Galiev:

Is it possible to display the icon in "future" bars? Apart from the application of fibo time lines.

I.e. it would be bars -1, -2 etc.



You can. Assign the time coordinate as time[0]+(PeriodSecond()*n)
 
Artyom Trishkin:
In mql4 we just need to memorize. In mql5 - CopyTicks().


Thank you.

Can you suggest a ready function to convert the number of bars of one timeframe (larger) to the number of bars on a smaller timeframe? In short, N bars on a higher timeframe how many will be the number of bars on a lower one?

 

In the simplest case, if only the closed bars of a senior period are considered, this is the number ratio. M15/M5 =3 bars of M5 correspond to 1 bar of M15.


 
igorbel:


I have an idea of how to use this in my trading account.

Can you suggest a ready function to convert the number of bars of one timeframe (larger) to the number of bars on a smaller timeframe? In short, N bars on a higher timeframe how many bars will it be on a lower one?

there is a following

if this does not work, try searching the forum - "

Period Converter

"

https://www.mql5.com/ru/code/7936

Period Converter
Period Converter
  • votes: 12
  • 2016.03.23
  • MetaQuotes Software Corp.
  • www.mql5.com
Скрипт для создания собственных нестандартных таймфреймов.
 

Good afternoon, could you tell me how to set a magik order

m_Trade.Sell(0.1,Symbol(),0,SL,TP);
for(int i=PositionsTotal()-1;i>=0;i--) // returns the number of open positions
   if(m_Position.SelectByIndex(i))
      m_Trade.SetExpertMagicNumber(count);

 

If you enter the archive of quotes and select a symbol, then there are only 2 000 bars of quotes.
If you want more, it will be downloaded from the methaquotes server.

That is, if you press the button "download" - then these quotes will be metaquotes. even the last 2 000 bars.

I wonder what quotes are tested in the tester, if you need more than 2 000 bars? Probably using the quotes of the broker, not the broker's quotes?

 

Good afternoon: There is a function where the indicator reads the tick history file . But it is read only once, when the indicator is loaded or updated. How can I make it read every time when the first tick of the zero bar appears?

void ProcessOldCandles(int limit, TickStruct &lastTick)

{

      int hTicksFile = FileOpen(Symbol() + ".tks", FILE_BIN | FILE_READ | FILE_SHARE_READ | FILE_SHARE_WRITE);

   if (hTicksFile < 1)

      return;

      TickStruct tick;

   while (!IsStopped())

   {

      if (!IsReadTimeAndBidAskOfTick(hTicksFile, tick))

         return;

      if (tick.time >= Time[limit])

         break;

   }

   lastTick = tick;

   int barIndex = iBarShift(NULL, 0, tick.time);

      while (barIndex >= 0)

   {

      if (!IsReadTimeAndBidAskOfTick(hTicksFile, tick))

         return;

         if (!IsTickBelongToBar(tick, barIndex))

         barIndex = iBarShift(NULL, 0, tick.time);

         ProcessOneTick(barIndex, tick, lastTick);

   }

      FileClose(hTicksFile);

 

Hello! The mql5 in metatrader4 is not authorised to subscribe to the signals...what can i do!

 
kalmyk87:

Hello! I can't authorize mql5 in metatrader4 to subscribe to signals...what to do!


Write a request to servicedesk (in the profile on the left), with details and screenshots.

Reason: