Scripts: Save history to HST

 

Save history to HST:

The script exports historical data to HST format for its use in MetaTrader 4 client terminal. This file can be imported in MetaTrader 4 as historical data or you can open it as offline chart.

Autor: Andrey Voytenko

 

por que OFFLINE_RECORD_SIZEé usado

quando

int position=bars_back*OFFLINE_RECORD_SIZE;

sempre 0 ?

 
wlad:

Por que OFFLINE_RECORD_SIZEé usado

quando int position=bars_back*OFFLINE_RECORD_SIZE; é sempre 0?

Tudo isso é feito para tornar a função WriteOfflineBar - a função de gravar dados no arquivo de histórico - universal.

Por exemplo: se você precisar atualizar o valor de uma barra que está no meio do histórico, por exemplo, a penúltima, especifique bars_back=1 e ela será atualizada.

 
avoitenko:

Tudo isso é feito para tornar a função WriteOfflineBar - a função de gravar dados no arquivo de histórico - universal.

Por exemplo: se você precisar atualizar o valor de uma barra que está no meio do histórico, por exemplo, a penúltima, especifique bars_back=1 e ela será atualizada.

Agradecimentos
 
Hello Mr. Voytenko , my name is Regis Karam, I'm from Brazil and found very interesting your script.Here in Brazil we only have the real time signal on the metatrader 5, so I thought you  could help me get our charts in real time in MT4 through your script or possibly turn this script on an indicator that can update the .hst file(rel-time) so that I can work with my system renko charts online, is it possible? I know little MQL5 and think it would be interesting to have an indicator that works this way, I have not found anything similar like it on the Internet. 
Thanks, 

Regis Karam
 
registk:
Hello Mr. Voytenko , my name is Regis Karam, I'm from Brazil and found very interesting your script.Here in Brazil we only have the real time signal on the metatrader 5, so I thought you  could help me get our charts in real time in MT4 through your script or possibly turn this script on an indicator that can update the .hst file(rel-time) so that I can work with my system renko charts online, is it possible? I know little MQL5 and think it would be interesting to have an indicator that works this way, I have not found anything similar like it on the Internet. 
Thanks, 

Regis Karam

Hello. Please look at this code:

https://www.mql5.com/en/code/9358

https://www.mql5.com/en/code/10766

Renko Charts
Renko Charts
  • votos: 10
  • 2009.12.16
  • baramantan
  • www.mql5.com
The Renko chart has been created by the Japanese Traders. The main feature of the Renko Charts is that it doesn't use the time and volume.
 

Thanks  for quickly reply. I'm testing this Renko system in the Forex market, but my problem is that  I don’t have real time signal in Brazil stock exchange ,only in new MT5, so for me to use Renko Charts on MT4  I need .hst file to be updated with  historical data in real time through the MT5 with your script  or indicator (savehistoryhst.mq5). Can you add an update routine of data in real time, similar routines of periodcon.mq4  converted to MQ5? Then I open a chart on MT5 , load de script and open my MT4 accessing  .hst file  with updates in real time, it would be possible?

Thanks! 

 

Se o arquivo hst for importado para o MT4 com o nome de um instrumento que não esteja no ambiente de mercado, o gráfico exibirá cotações com menos dígitos do que o especificado no arquivo. Por exemplo, não 5, mas apenas 4.

Isso impede a comparação de cotações. É por isso que podemos seguir outro caminho. Crie um arquivo com o nome do instrumento MT4 existente e especifique um período de tempo não padrão, por exemplo, 11, 23, etc.

Para definir o nome do instrumento e o período de tempo necessários, há configurações correspondentes no script.

 
Ótimo script! Obrigado.
 
Ótima ferramenta! Tive que usar o Chat GPT para definir algumas mensagens de erro que foram impressas, mas, no final, consegui fazer funcionar. Muito obrigado.