Calculated data in the indicator buffers getting out of sync with bars of your chart - offline charts

MQL4 지표 C++ SQL

명시

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
개발자 1
등급
(15)
프로젝트
34
24%
중재
3
0% / 33%
기한 초과
2
6%
작업중
2
개발자 2
등급
프로젝트
0
0%
중재
0
기한 초과
0
작업중
비슷한 주문
I need a clean, simple EA for MT5 that consistently produces ~5% monthly return with moderate trade frequency (6–12 trades/week). - Must auto-compound or use risk-based lot sizing - Must include .mq5 source file , not just .ex5 - Must show backtest proof on 2 different pairs , preferably M30/H1 - Must be original or legally yours to transfer, this will be used in a broader structured trading setup I’m building I
THE STUDY : Add 4 study overlay in the input settings and color bar based on alert condition is sg1=1 I want it to trail the order instead of flat to avoid too much slippage What I do is the 15-Minutes chart I have filter also in the 10tick chart if those filters are meet the bar is green or red using sierrachar color bar based on alert condition I overlay the 4 in the study in the 6tick Renko chart that will
want an aggressive scalping Expert Advisor (EA) for XAUUSD (Gold) on M1 timeframe with the following features: ✅ Uses a combination of EMA, RSI, and ATR for entry signals. ✅ Recovery Mode to increase lot size on confirmed setups to recover losses safely. ✅ Trailing Stop functionality with adjustable start and step parameters. ✅ Stop trading after daily target or daily loss limit is reached. ✅ Money Management (fixed
Hello! I've been working on a strategy that uses Ninzarenko candles from ninza.co, and while I am making incremental progress, i think I need someone to get me 100% across the finish line. This is a simple standard deviation strategy, take a look at the screenshot and see if this is something you think we can do together. Basic requirements below .. . let me know if you have any questions! Goal of the Strategy Trade
I have an account on (MT4 AxiTrader) I need some support from you I need to add a bank account on the Client Portal. Once its verify my bank account, I can submit a withdrawal. If you can do that for me then send me an offer please If you can can help how to add a bank account on the (Client Portal) please I will be very appreciate
to compile all the suitable markets for buy and place a buy for the shortest timeframe and place a sell for also a shortest timeframe it should work with all brokers and can automatically place a trade as long as its connected to the internet it should inform where the contracts are placed and for how long
i am looking for an indicator that gives buy sell signal by placing arrows on the chart, signals must not repaint or be placed with an offset, i want it to be accurate enough so i can trade from signal to signal and actually make profit, do any one have a strategy and skill to create such an indicator, and also it is to mql5, ( Important is, It must have No repainting and No offset ), if you know it is something you
The PRD: 1. Plugin ensures that individual opening positions come from MT4 to our colocated virtual machine 2. A score is returned from a lookup 3. Binary decision based on score. 4. Matches closing position with opening position; doesn't score, simply closes the trade. The plugin UX should have the following: 1. Risk threshold per grouping, easily entered by the client 2. Reporting of revenue comparisons To confirm
Mql5 indicator 30+ USD
I'm looking for an indicator that gives buy sell signals by placing arrows on the chart Signals must not repaint or be placed with an offset I want it to be accurate enough so j can trade from signal to signal amd actually make profit Do anyone have a strategy and skill to create such an indicatore First priority is to mql5
I need help listing all the studies from a chart. * I’m trying to build a scoring engine and show the score as a text message right on the chart, so I don’t have to keep checking multiple charts. Another project I’m working on—I’ve subscribed to OrderFlowLabs indicators and want to use Python to build better scoring logic. I started working on it using Claude.ai Max, but I got a bit distracted. Now, i need to

프로젝트 정보

예산
30 - 100 USD
개발자에게
27 - 90 USD