Dukascopy
 
 
Wiki JStore Search Login

Jforex Indy charting question...
 Post subject: Jforex Indy charting question... Post rating: 0   New post Posted: Fri 29 May, 2015, 17:35 
User avatar

User rating: 2
Joined: Sat 02 May, 2015, 20:20
Posts: 20
Location: Ukraine, Kyiv
I'm new to Jforex here. I'm altering the zigzag indicator and found the place I am interested in putting the calculation and chart drawing. I've already got the code working perfectly in MQL4. I attempted to copy the wiki chart drawing objects at: https://www.dukascopy.com/wiki/#Indicator_draws_chart_objects
but ran into this problem. Here's the code from the example below...
        IBar barFrom = inputs[0][maxIdx];
        IBar barTo = inputs[0][inputs[0].length - 1];

I think I need this info to plot text, rectangles etc so I can tell jforex from what bar and to which bar to plot etc. But the Zigzag indy already has the following input:
         private double[][][] inputs = new double[1][][];

I tried adding the correct code from the example indy which is:
         private IBar[][] inputs = new IBar[1][];

When I put both of them in, they conflict. I don't fully understand everything here so any help is appreciated. If I could figure out how to get this triangle and text in the same indy as the zigzag I could figure out the rest of how to convert my mql into jforex.
Thank you!!!!
TBB


 
 Post subject: Re: Jforex Indy charting question... Post rating: 0   New post Posted: Wed 26 Aug, 2015, 03:51 
User avatar

User rating: 0
Joined: Fri 10 Oct, 2014, 00:35
Posts: 58
Location: New Zealand, Auckland
I see no one has helped so far, so I will try...
I am not very experienced, but I worked with a similar problem before.

In order to draw objects you need the bar time, which comes with the IBar input (as you know, I think).
Zigzag used Price input, which does not include bar time (as you know, I think).
This means you need two different types of input. This is described in this Wiki page on indicators with multiple types:
https://www.dukascopy.com/wiki/#Indicat ... nput_types

An alternative approach is to modify the Zigzag indicator to use IBar input, and get the price data from the IBars.

Cheers
Tony


 

Jump to:  

  © 1998-2024 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com