Debug: array out of range issue + 2 buffers return value of 1 on live chart for every bar

Техническое задание

Only for developers with experience in debugging, and array-out-of-range issues.


A custom indicator seems to work on a static chart, but 1 buffer still has mistakes in it, resulting in a value of 1 for every bar: the code needs to be reviewed and modified, resulting in a working indicator for every symbol, for every timeframe: sometimes when the timeframe is switched, the chart closes automatically, but all the time the value of ExtMapBuffer2 (Aqua) is 1 on the live chart, sometimes there is an "array out of range" issue. The second buffer: NonRepaintBuffer (red line on the image below) is based on the first one:  ExtMapBuffer2. ExtMapBuffer2 repaints around turning points, so this second buffer is added ( NonRepaintBuffer ) that does not change values in the past. As the red line is calculated based on the aqua line, the error must be contained within the  ExtMapBuffer2 calculation.



So review, edit & fix please.

I'm happy to answer any questions.

- - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - -  - - - - - 

About the indicator:

A zig-zag NRP close is applied to an oscillator.

On this, a counter is added, to keep track of the number of bars since the last "zag" (that does not repaint). The counter adds 0 for a counter-trend bar, and 1 for a trend bar. So when in a rising segment, you have a small counter-trend down-swing, the counter is flat. If after this counter-trend down-swing the trend goes back up, and a new high is made, the counter takes the value as if there would not have been a counter-trend piece (like only rising bars). (& vice versa for falling segment).

Every trend change starts with a retracement against the current trend, so the counter will be flat during this time, but when the trend goes further (than an acceptable retracement as in the setting for the zigzag), a new leg of the zig zag is created. 

The problem with the current code, is that at that moment (when a new leg of the zigzag close nrp on the oscillator appears), the counter jumps back to the start of the retracement (of the flat part), instead of the end of the flat part. 

So it is not a repainting error, it is a code error.

To fix this, a new buffer that does not repaint is added.



Файлы:

ZIP
trash15.zip
3.6 Kb

Откликнулись

1
Разработчик 1
Оценка
(254)
Проекты
573
36%
Арбитраж
64
20% / 58%
Просрочено
147
26%
Свободен
2
Разработчик 2
Оценка
(440)
Проекты
546
25%
Арбитраж
21
38% / 38%
Просрочено
83
15%
Работает
3
Разработчик 3
Оценка
(486)
Проекты
552
32%
Арбитраж
28
43% / 43%
Просрочено
8
1%
Занят
4
Разработчик 4
Оценка
(4)
Проекты
4
0%
Арбитраж
0
Просрочено
0
Работает
5
Разработчик 5
Оценка
(259)
Проекты
316
37%
Арбитраж
6
50% / 17%
Просрочено
7
2%
Свободен
6
Разработчик 6
Оценка
(383)
Проекты
411
69%
Арбитраж
3
100% / 0%
Просрочено
2
0%
Занят
7
Разработчик 7
Оценка
(42)
Проекты
58
60%
Арбитраж
2
50% / 0%
Просрочено
6
10%
Работает
8
Разработчик 8
Оценка
(2441)
Проекты
3076
66%
Арбитраж
77
48% / 14%
Просрочено
340
11%
Свободен
9
Разработчик 9
Оценка
(13)
Проекты
13
31%
Арбитраж
0
Просрочено
0
Свободен
10
Разработчик 10
Оценка
(131)
Проекты
172
38%
Арбитраж
4
25% / 50%
Просрочено
13
8%
Работает
11
Разработчик 11
Оценка
(3)
Проекты
2
50%
Арбитраж
1
0% / 100%
Просрочено
0
Свободен
Похожие заказы
dreams good and have a great Cash out from your smart phone , tuyoywuiy glamorous flood see full idk idk slow so dolls stupid sis workouts who's spark koalas oral waits also doggo idk
Hello, I have a protected Ninja trader Order Flow indicator and I was wondering if you can reverse engineer it to replicate the functionality. H ere are the specifications and indicator: https://docs.google.com/document/d/1KyYwQ7iTL2KWGhnZzxS1gObccu9LPMrGuMc9Mdk_3KY/edit?usp=sharing
EA MT5 SNR 30 - 100 USD
I need a developer who can work with quickly & details. make an EA MT5 Classic Support aNd Resistance multi time frame marking single Classic support and resistance support type A and Resistance type V make an alert pop-up
It is using EMA/SMA for triggers of long or short (green long/red short) and the line above or below is the stop loss, profit triggers would need to figure out or allow it until next trigger. Already in thinkscript And add parameters
A “grid” display style like the attached image. User can choose up to 3 EMA’s to monitor on up to 6 Time Frames. If the EMA slope is greater than 0 = Green If the EMA slope is less than 0 = Red If the EMA slope is 0 = Black The grid should be customizable on it’s size, colors, and placement on the chart. Each EMA should update per tick. A label at the top of the grid should read “SLOPES” Indicator 2: A “grid” display
Requirement: 1. Convert Pivot source code .mq4 to Sierra Chart mq4 source code is provided .mq4 as attached .mq4 2. upon conversion to add a button code on Sierra chart .cpp to allow display/hide the pivot line in Sierra Chart ---- *no need alert, make it light without any alert, just a button to display/hide pivot line will do :) to continue, pivot font text also no need I"ve mark with red cross to remove see
I have 2 (indicators) I coded and I use on Tradingview I just need converted to use on Ninjatrader i will be looking for great developer to bid for it and for more details
Hello, I'm seeking a freelancer with access to a ready-made server solution for an educational forex project. Requirements: Ability to control or manipulate live or historical trading data. Platform to execute simulated trades with exaggerated outcomes. Tools for real-time trade simulation (white-label or virtual dealer solutions). If you have a suitable server or can help me find one, please reach out with details
A green point should be added at the Low point of candlesticks in the oversold zone—it is the L point. If there is at least one L point between two H points, search for a LL point in the interval between two H points. The candlestick with the lowest Low price will be the LL point. Generally, the LL point is not necessarily an L point. Search for candlesticks with the lowest Low price. If there is at least one H point
Hello there!! I need a professional ninjatrader developer who can code my specifications to an EA .kindly bid and all the necessary informations will be sent via chat box..Thank you

Информация о проекте

Бюджет
90+ USD
VAT (21%): 18.9 USD
Итого: 108.9 USD
Исполнителю
81 USD
Сроки выполнения
от 1 до 3 дн.