Create an EA that will open 4 empty subwindows with its appropriate height

Tâche terminée

Temps d'exécution 1 jour
Commentaires de l'employé
I'm glad I met the client. It was difficult, but everything worked out. Thanks for your patience!
Commentaires du client
good programmer.... finished the job in 1 day when i gave 3 days

Spécifications

repair these mt5 files so it will open 4 panes using hash tables to manage the subwindow handles
each pane row heights are defined in externvariables

#define SUBWINDOW1 "Technical Window 1"     // Shortname
#define SUBWINDOW2 "Technical Window 2"
#define SUBWINDOW3 "Technical Window 3"

#define SUBWINDOW4 "Trade Window"

use SubwindowTemplate to open the 4 windows above, height = 60 pixel/pane, show subwindow shortname on the top left corner of the subwindows

Obtain the full height without subwindow of the Main Chart in pixels.  80% of total Chart height dedicated to 4 panes.  each pane will have 20% max chart pixel and divide that by 12 maximum rows and 30 maximum column
save these pixel heights in int    m_YDistance[Y_DISTANCE_BUFFER];

example, total height of chart = 1000 pixels.  800 pixel dedicated to the subwindows.  each subwindows have a maximum of 12 rows. so 800 pixels/4 panes = 200 pixel/12 rows = ......

instead of using iCustoms to open the subwindows use hash to open the windows instead

like the following:-
CGraphics::Graphics()
[
     m_WindowsHash=new Hash(); // create new hash to manage the window handlers
}

CGraphics::InitTechnicalAnalysisWindow0(string WindowName)

{

if(!InitSubwindow(WindowName))

    {

      printf("Fail to Init Sub-Window Name = "+WindowName);

      return false;

    }

    int windowID = ChartWindowFind(m_WindowID[1], WindowName);   

   if(windowID<0)

      return false;

ResizeSubWindow(WindowName,m_ChartHeightPixel[1]);

}

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+

bool Graphics::StartCustomIndicator(int hWnd,string ChartName,bool AutomaticallyAcceptDefaults=false)

  {

   ResetLastError();

   

   printf("Start Custom Indicator");


   uchar charArrayIndicatorName[];

   StringToCharArray(ChartName,charArrayIndicatorName,0);


   // printf("charArrayIndicatorName = "+charArrayIndicatorName);


   int MessageNumber=RegisterWindowMessageW("MetaTrader4_Internal_Message");

   int res=SendMessageW(hWnd,MessageNumber,15,charArrayIndicatorName);

   if(res)

     {

      LogError(__FUNCTION__,"Failed to post a msg winAPI",GetLastError());

      return false;

     }


   return true;

  }

//+------------------------------------------------------------------+

//|                                                                  |

//+------------------------------------------------------------------+  

bool Graphics::InitSubwindow(string ChartName)

  {

   ResetLastError();

   

   if(WindowFind(ChartName)>0)

     {

      if(m_WindowsHash.hGetInt(ChartName) < 0)

         m_WindowsHash.hPutInt(ChartName,WindowFind(ChartName));


      return true;

     }


   int hWnd=WindowHandle(Symbol(),0);

   if(!hWnd)

     {

      LogError(__FUNCTION__,"Window not found",GetLastError());

      return false;

     }

   bool res=StartCustomIndicator(hWnd,ChartName);

   if(WindowFind(ChartName)<0)

     {

      MessageBox(ChartName+" Indicator window not found.","ERROR",MB_ICONERROR);

      LogError(__FUNCTION__,ChartName+" Indicator window not found",GetLastError());

      return false;

     }


   if(res)

      m_WindowsHash.hPutInt(ChartName,WindowFind(ChartName));


   return res;

  }


Répondu

1
Développeur 1
Évaluation
(2)
Projets
2
0%
Arbitrage
1
0% / 0%
En retard
0
Gratuit
Commandes similaires
Hello, I have a strategy written in Pine Script (TradingView) that used to send signals to MetaTrader 5 via PineConnector. Now I want a native MT5 Expert Advisor (EA) written in MQL5, so I can do full backtesting and trading inside MetaTrader without any external bridge. I will provide: - Full Pine Script code - Entry and exit rules (based on BOS and OB logic) - SL/TP and dynamic risk management (R:R) - Breakeven
PROJECT DESCRIPTION I am using a Telegram → MetaTrader trade copier (currently TWP Copier 1.08) which receives trade signals correctly but does NOT consistently execute trades on MT4, despite: Signals being received and logged AutoTrading enabled Live trading allowed Correct symbol names (no suffix/prefix issues) Manual trades working perfectly No trade conflicts or filters blocking execution CURRENT ISSUE Telegram
I am looking for an experienced MQL5 developer to convert a complex TradingView Pine Script (will provide the script from tradingview) into a fully automated MT5 Expert Advisor -bot. The TradingView script includes: Market Structure (BOS, CHoCH, Swing BOS) Strong / Weak High & Low Equilibrium (Premium / Discount zones) Volumetric Order Blocks Fair Value Gaps (FVG / VI / OG) Accumulation & Distribution zones Equal
I want to check if this indicator is repainting or not Whick mean the results of back testing is legit or not if anyone can help me to review it kindly to well to contact me i will be happy to work and go on long term work with anyone thanks
Bot sympaFX 30+ USD
Stratégie : "Institutional Flow Scalper" La stratégie repose sur la confluence de la tendance structurelle et de la valeur moyenne pondérée . Actifs cibles : EURUSD, GBPUSD (Spread faible, forte liquidité). Sessions : Londres (09h00 - 12h00) et New York (14h30 - 17h30 GMT+1). Indicateurs : EMA 200 : Filtre de tendance long terme (M5). VWAP : Ancre du prix institutionnel. On achète sous le VWAP en tendance haussière
1.Sinyal Perdagangan : Sinyal beli: garis MACD utama memotong garis sinyal ke atas (macd_current>signal_current && macd_previous<signal_previous). Sinyal jual: garis MACD utama memotong garis sinyal ke bawah (macd_current<signal_current && macd_previous>signal_previous). Gambar di bawah menunjukkan kasus beli dan jual. 2. Posisi ditutup pada sinyal yang berlawanan: Posisi beli ditutup pada sinyal jual, dan posisi
can anyone help me with building a complete automated pine code strategy and indicator that work for both FXs & CFDs and have a high winning rate proved through back testing. I have a very complex current code that developed mostly using AI but lots of gaps are there although it translate exactly what I have in my mind. So, you are free to decide whether wo build a complete new code or fix my current working code ( i
Greeting Im in need of a programmer that can help me convert from TOS to trading view? The script is available with me, kindly bid if it is what you can do for me Thanks
can you help me with I need an ATM strategy for NT8, here's the criteria: Forex trade entry 100,000 units with a starting SL of 70 pips. The following proft targets: 33 pips, 68, 125, 180. All targets exit 25,000 units each. As each target is hit, move SL to BE+5, then BE+35, then BE+70. So the SL's are fixed, not trailing. I can't figure this out on my platform
This strategy is built around the idea that price seeks liquidity, and that retail traders often get trapped around key highs and lows. Instead of entering trades before price hits liquidity, this playbook waits for the market to run stops (take liquidity) and then trade the reversal after the trap is formed. The concept is simple: buy below lows, sell above highs, but only when those lows or highs have respected

Informations sur le projet

Budget
100 - 300 USD
Délais
de 1 à 2 jour(s)