I need assistance debugging a cAlgo program -- $30

C# Indicators Other C#

Job finished

Execution time 1 hour
Feedback from customer
The developer is very professional. The job was completed in less than 2 hours of being accepted. I would recommend him any-day.

Specification

i converted an MQL5 indicator "Volume Zone Oscillator" to cAlgo. The indicator attaches to the chart and displays but it throws an error " Crashed in Calculate with IndexOutOfRangeException: Index was outside the bounds of the array."; I need assistance with debugging


MQL5 indicator is attached.


The cAlgo indicator is below

///=====================================================


// Importing necessary namespaces

using cAlgo.API;
using System;

namespace cAlgo
{

[Cloud("Upper Level", "Lower Level", FirstColor = "Gainsboro", SecondColor = "Crimson", Opacity = 0.4)]
[Indicator(IsOverlay = false, TimeZone = TimeZones.UTC, AccessRights = AccessRights.None)]
public class VolumeZoneOscillator : Indicator
{
// Declare the indicator buffers
[Output("Upper Level", PlotType = PlotType.Line, LineColor = "Gainsboro")]
public IndicatorDataSeries LevUp { get; set; }

[Output("Lower Level", PlotType = PlotType.Line, LineColor = "Crimson")]
public IndicatorDataSeries LevDn { get; set; }

[Output("Volume Zone Oscillator", PlotType = PlotType.Line, LineColor = "DarkGray")]
public IndicatorDataSeries VZO { get; set; }

[Output("Volume Zone Oscillator Color", PlotType = PlotType.Line, LineColor = "LimeGreen")]
public IndicatorDataSeries VZOC { get; set; }

// Declare input variables
[Parameter("Period", DefaultValue = 14)]
public int Period { get; set; }

// Private variables
private double[,] work;
private double alpha;

// Initialize method
protected override void Initialize()
{
work = new double[Bars.Count, 2];
alpha = 2.0 / (1.0 + Period);
//Chart.Title = "Volume Zone Oscillator (" + Period + ")";
}

// Calculate method - Called for every new bar/candle
public override void Calculate(int index)
{
// Skip if insufficient data
if (index < Period) return;

double sign = 0;
if (index > 0)
{
sign = (Bars.ClosePrices[index] > Bars.ClosePrices[index - 1]) ? 1 : (Bars.ClosePrices[index] < Bars.ClosePrices[index - 1]) ? -1 : 0;
}

double R = sign * Bars.TickVolumes[index];
work[index, 0] = (index == 0) ? R : work[index - 1, 0] + alpha * (R - work[index - 1, 0]);
work[index, 1] = (index == 0) ? Bars.TickVolumes[index] : work[index - 1, 1] + alpha * (Bars.TickVolumes[index] - work[index - 1, 1]);

// Calculate VZO (Volume Zone Oscillator)
if (work[index, 1] != 0)
VZO[index] = 100.0 * work[index, 0] / work[index, 1];
else
VZO[index] = 0;

// Calculate VZOC color (Volume Zone Oscillator Color Index)
VZOC[index] = (VZO[index] > 0) ? 1 : (VZO[index] < 0) ? 2 : 0;

// Calculate LevUp and LevDn (to draw filling)
LevUp[index] = Math.Max(VZO[index], 0);
LevDn[index] = Math.Min(VZO[index], 0);
}
}
}


===================================================================



Responded

1
Developer 1
Rating
(1)
Projects
2
0%
Arbitration
1
0% / 0%
Overdue
0
Working
2
Developer 2
Rating
(2)
Projects
3
0%
Arbitration
8
13% / 88%
Overdue
1
33%
Free
3
Developer 3
Rating
(95)
Projects
103
27%
Arbitration
3
33% / 33%
Overdue
2
2%
Working
4
Developer 4
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
5
Developer 5
Rating
(3)
Projects
1
0%
Arbitration
5
0% / 100%
Overdue
0
Free
6
Developer 6
Rating
(3)
Projects
2
0%
Arbitration
1
0% / 100%
Overdue
0
Free
Similar orders
I would like to create an indicator for my strategy on trading view , my strategy involves a liquidity sweep , wick or candle body closure , this needs to happen inside a higher time frame pd array such as a fair value gap that’s atleast 5m + and there needs to be an inversion fair value gap for my entry , I want the fair value gaps on all time frames so I can see them all on the 1 minute chart but i want the fair
can you help me with making a simple tradingview/script that draws boxes labeling consolidation areas according to my specifications? IF anyone can help with this kindly do well to bid to this so we can discuss more about the project thanka
MetaTrader 5 (MQL5) için Expert Advisor geliştirecek TÜRK MQL5 yazılımcı arıyorum. 📌 Gereksinimler: - MQL5 diline hâkim (MT5 native) - Daha önce çalışır EA / indikatör teslim etmiş - Temiz, modüler ve yorumlu kod yazabilen - Debug ve backtest sürecine destek verebilen - Kaynak kodu (.mq5) teslim edebilen 📌 EA Özeti: - Kendi stratejime uygun işlem alacak - Xauusd ve SPX500 işlem alacak. - Günlük bias kontrolü
I have an indicator that I would like to create .. Me Nov 13 at 3:42 PM Hello .. I would like a custom indicator for ninja trader 8 .. Here are the details. I want Asian session, London Session, and Ny session to be marked out with different colors. I want the highs and lows of each session to be marked out using the 30 min time frame. I want a feature that marks out fair value gaps. (able to change time frame no
I'm seeking a NinjaTrader indicator and scanner to identify stock patterns for swing trading. I need this tool to help pinpoint swing highs and lows and key levels, covering various timeframes. Scope of work - Develop NinjaTrader indicator for last swing high and low - Implement key level marking for supply and demand zones - Create a market analyser scanner for reversal, structure shifts, and breakout patterns -
I'm seeking a NinjaTrader indicator and scanner to identify stock patterns for swing trading. I need this tool to help pinpoint swing highs and lows and key levels, covering various timeframes. Scope of work - Develop NinjaTrader indicator for last swing high and low - Implement key level marking for supply and demand zones - Create a market analyser scanner for reversal, structure shifts, and breakout patterns -
Standalone AI bot to send real-time buy/sell signals to crypto traders via SMS, targeting the 2025 bull run and scaling to a large user base. It pulls live data (price, volume, order book) from Binance, Coinbase, Kraken, and Uniswap using CCXT APIs and WebSocket, with optional X sentiment (xAI API) or news (NewsAPI) for extra context. Adapt our NinjaTrader ML algo for crypto, using inputs like price, volume, RSI
Take your gold trading to the next level with CyberGold Scalper , the ultimate XAUUSD MT5 EA designed for precision, speed, and reliability. ✅ Features: Multi-Timeframe Confirmation: M5, M15, H1 filters for smarter entries. ATR & RSI Based Signals: Trade only when the market conditions favor profit. Dynamic Lot Sizing: Risk is automatically calculated based on your balance. Partial Profit & Trailing Stop: Maximize
Ninjatrader 100+ USD
Hello Dear I have an existing, working NinjaTrader 8 bot and need a small, surgical modification (no rewrite). Work needed: Remove manual trade-direction selector Add automatic 1-hour SMT bias logic (MNQ vs MES, 3-candle swing points) SMT bias must persist until invalidated or flipped Add simple chart annotations (bias color + line) Everything else in the bot must remain unchanged. Looking for a developer experienced
I want the Robots to execute buy/sell/TP/SL trades without me telling them to, Buy low Sell high Forex Pairs, I want to gain profit not lose profit, using INDICATORS, strategies, Expert Advisors, signals, Symbols, MA RSI, Awesome Accelerators', Algorithmic Trading and Scanners on real time data

Project information

Budget
30+ USD
Deadline
to 2 day(s)