명시
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
작업중
비슷한 주문
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
I want to buy the EA today, Provide me with demo ex5, proof of profitability and Proof that the EA is profitable in your application. *NO Martingale* or Avaraging down
Ea make based on smc
40 - 50 USD
I want ea based on SMC concept,, i have good knowledge in smc,, if you have good knowledge then only message me we will discuss,, bos,, imbalance then take trade ,, with fixed sl and rr
Pazuzu
30+ USD
generate or create me a python coded file that has mql5 language requirements for a trading bot under the following instructions. the bot must execute trades if necessary the bot must trade 24/7 the bot must trade gold and currency the bot must make unlimited profit hourly the bot must enter market with caution after market analysis of 98 percent of clear trade
프로젝트 정보
예산
30 - 100 USD