명시
Good day
Please refer to this post (reply from emmzett on 21 March 2024 at 11:12pm
https://www.forexfactory.com/thread/1274095-how-to-refresh-offline-charts-without-restarting-mt4
I need someone to assist me with either option 1 or 2.
Extract from the forum on forexfactory.
(1) First option: You programatically detect in your indicator whether you are running in an online or offline chart. There are various ways to do this. Now when you now that you are in an offline chart, instead of recalculating only the last invalid offset of your indicator buffers (bar 0) you always recalculate all bars. Thus bringing offline file and indicator forcefully in sync with every new tick. The drawback of this option: If you use many bars in your chart or indicator computations are expensive resource-wise, then this will slow down your terminal/charts significantly. Option 1 is the easy option.(2) Second option: Typically one uses the function IndicatorCounted() or parameter 'prev_calculated' of function OnCalculate() to determine the number of bars to update/recalculate. In offline charts this function doesn't work as expected. It always returns all bars as changed (essentiallly enforcing the solution of option 1). Instead we can emulate the online functionality and if we detect new bars coming in, then we do manually what the terminal would do in an online chart. We shift our indicator buffers with calculated indicator values manually by the number of incoming bars. This shifting can be done in pure MQL but it's slow. I use a DLL function to let C++ do the job for me which is lightning fast. There is one function per buffer type and these functions are part of my MT4Expander which is open-source and available on Github. However, this solution is only suitable for very experienced programmers. In code it looks like in the 3rd screenshot and is part of start() or OnCalculate().
응답함
1
등급
프로젝트
34
24%
중재
4
0%
/
50%
기한 초과
2
6%
작업중
2
등급
프로젝트
0
0%
중재
0
기한 초과
0
작업중
비슷한 주문
(Job Description) I am looking for a professional expert to set up a COMPLETE MT4 FULL SERVER ENTERPRISE (Must be a standalone Full Server, absolutely NOT a White Label). The final result must be 100% identical in functionality to the professional admin manipulation systems seen in private server videos. Mandatory Project Requirements: 1. Full Enterprise Admin Control: Deliver a fully functional MT4 Manager
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
프로젝트 정보
예산
30 - 100 USD