Range Bar Trading

 

I am trying range bar trading but the offline charts are not updates to current date. Does anyone know how to update offline charts?? Thanks in advance

 
Here, this has been talked about allot in the past.
 
ubzen:
Here, this has been talked about allot in the past.


new here and scrolled through topics couldn't find anything.

Thanks

 
Do you know how to code in mql4 and WINAPI?
 
ubzen:
Do you know how to code in mql4 and WINAPI?

no i dont
 
You'll need a good understanding of how those work in-order to fix your problem. Unfortunately there's no simple fix unless you're willing to learn coding the above.
 
tuccir:

I am trying range bar trading but the offline charts are not updates to current date. Does anyone know how to update offline charts?? Thanks in advance

Hi tuccir,

You need to send fake tick to that offline chart.

Attach this EA to any online chart.

(EDIT : We don't need a loop, that will cause heavy processor usage. We can also set this as CI)

:D

#include <WinUser32.mqh>
#import "user32.dll"
        int RegisterWindowMessageA(string lpString); 
#import
//#property indicator_chart_window
extern string Offline_Symbol = "";
extern int    Offline_TimeFrame = 0;
extern int    Send_Tick_Every = 500;

int Handle_Chart, MT4_Internal_Msg;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int init ()
  {
  Handle_Chart = 0;
  MT4_Internal_Msg = 0;
  
  //SEND_FAKE_TICK();
  return (0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int deinit ()
  {
  
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+ 
int start ()
  {
  SEND_FAKE_TICK();
  return (0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void SEND_FAKE_TICK()
  {
  
  if (Offline_Symbol == "")Offline_Symbol = Symbol();
  switch (Offline_TimeFrame)
    {
    case PERIOD_M1:
    case PERIOD_M5:
    case PERIOD_M15:
    case PERIOD_M30:
    case PERIOD_H1:
    case PERIOD_H4:
    case PERIOD_D1:
    case PERIOD_W1:
    case PERIOD_MN1:
      {
      Alert ("Wrong Offline Time Frame Dude !!!");
      return (0);
      }
    }
  
  //while (!IsStopped())
  //  {
    if (Handle_Chart == 0) 
      {
      Handle_Chart = WindowHandle(Offline_Symbol, Offline_TimeFrame);
      if(Handle_Chart != 0) Print("Chart window detected");
      }

    if(MT4_Internal_Msg == 0) 
       MT4_Internal_Msg = RegisterWindowMessageA("MetaTrader4_Internal_Message");

    if(Handle_Chart != 0)  if(PostMessageA(Handle_Chart, WM_COMMAND, 0x822c, 0) == 0) Handle_Chart = 0;
    if(Handle_Chart != 0 && MT4_Internal_Msg != 0) PostMessageA(Handle_Chart, MT4_Internal_Msg, 2, 1);    
    
    //Sleep (Send_Tick_Every);
    //}
    
  return (0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
 
tuccir: Does anyone know how to update offline charts??
You keep the generator attached to the M1 on-line chart. (Most generators will send a refresh message to the off-line chart)
 

Please excuse my ignorance. What do you mean by a generator. I found range bar EA downloaded and it works fine with the exception that some currency pairs and cfd's do not have latest data updated.

Just wanted to thank you all for taking time to answer my questions

 

EA's trade off of charts (on-line or off-line.)

A range bar generator (could be an indicator or EA) creates a off-line chart of range bars. Needed since Mt4 doesn't have constant range bars, or Renko charts.

I have no idea what you mean by range bar EA.

 
WHRoeder:

EA's trade off of charts (on-line or off-line.)

A range bar generator (could be an indicator or EA) creates a off-line chart of range bars. Needed since Mt4 doesn't have constant range bars, or Renko charts.

I have no idea what you mean by range bar EA.


I guess i meant I downloaded script for range bars. I understand mechanics of setting up range bar chart going offline M2 chart ect.. My issue was some currency pairs and cfd's were not updated to the present day
Reason: