I need help locating the problem

 
I have a custom indicator that runs in a different window (at the bottom). When I start it the journal tab shows "2012.04.11 15:45:01 Custom indicator Indicator_Environment EURUSD,M1: loaded successfully" the expert tab shows "2012.04.11 15:45:01 Indicator_Environment EURUSD,M1: loaded successfully" but the window is not created. I attempted to Print(...) from the init() function, nothing is printed to the experts tab. The indicator was created using the wizard, it is a simple wrapper of mq4 code which calls a function in a dll, the function returned value is entered in the ExtMapBuffer1. The chart is enabled to use dlls, Where else can I look to see problems/errors?


 

Try posting the indicator's code and perhaps someone would spot something.

 
ubzen:

Try posting the indicator's code and perhaps someone would spot something.


Here is the source
 
quantum123:

Here is the source

Do you have these files too ?

#include <Quantum-Prop.mqh>

#include <Quantum-Prop-Local.mqh>

#include <Quantum-Prop-Include.mqh>

 
RaptorUK:

Do you have these files too ?

#include <Quantum-Prop.mqh>

#include <Quantum-Prop-Local.mqh>

#include <Quantum-Prop-Include.mqh>


Here they are
quantum-prop.mqh
#import "Quantum-Prop.dll"
        int    QP_Compute_Stats(double open[], double high[], double low[], double close[], double price[], double data[], int numData); 
        double QP_Compute_Ranges(double open[], double high[], double low[], double close[], int numRates, int type); 
        int    QP_Base(double open[], double high[], double low[], double close[], double price[], int numRates, int offset); 
        double QP_Mean(double myData[], int numData, int offset); 
        double QP_Sum_Of_Change(double myData[], int numData, int offset); 
        double QP_Standard_Deviation(double myData[], int numData, int offset); 
        double QP_Least_Squares(double myData[], int numData, int offset); 
        int    QP_Reversal(double prices[], double data[], double sensitivity, int numRates, int offset);
        int    QP_Initiate_Position(double open[], double high[], double low[], double close[], double price[], double stats[], double inst[], int numData);
        int    QP_Manage_Buy_Order( double open[], double high[], double low[], double close[], double price[], double stats[], double inst[], int numData);
        int    QP_Manage_Sell_Order(double open[], double high[], double low[], double close[], double price[], double stats[], double inst[], int numData);    
        int    QP_Crossings(double series[], int num_series, int period, int ma_1, int ma_2, double info[], int offset); 
        int    QP_MA_Environment(double series[], int num_series, int period, int ma_1, int ma_2, double info[], int offset);
        
#import
==================================================================================
quantum-prop-include.mqh

#define QP_ERROR    -1000

#define QP_SHORT    0
#define QP_LONG     1

#define QP_BUY      1
#define QP_HOLD     0
#define QP_SELL    -1
//
// QP_STAT_xx are used by QP_Compute_Stats()
// The #defines are used as an index into arrays, DO NOT CHANGE !!!
//
#define QP_STATS_NUM_STATS                              18   // number of statistics in returned array
#define QP_STATS_RANGE_MEAN                              0   // mean (high - low)
#define QP_STATS_RANGE_STDDEV                    1   // standard deviation of series (high - low)
#define QP_STATS_RANGE_SUM                               2   // mean of top 10 (high - low)
#define QP_STATS_CANDLES_MEAN                    3   // mean absolute (open - close)
#define QP_STATS_CANDLES_STDDEV                  4   // standard deviation  of series absolute(open - close)
#define QP_STATS_CANDLES_SUM                     5   // mean top10 absolute (open - close)
#define QP_STATS_MA_AVG_DURATION_UP              6   // Average duration stma is above mtma
#define QP_STATS_MA_AVG_SPREAD_UP                7   // Average peak stma - mtma
#define QP_STATS_MA_AVG_PEAK_UP                  8   // average duration to peak
#define QP_STATS_MA_AVG_DURATION_DOWN    9   // average duration stma is below mtma
#define QP_STATS_MA_AVG_SPREAD_DOWN              10  // average peak mtma - stma
#define QP_STATS_MA_AVG_PEAK_DOWN                11  // average duration to peak
#define QP_STATS_MA_STDDEV_DURATION_UP   12  // StdDev average duration up
#define QP_STATS_MA_STDDEV_SPREAD_UP     13  // StdDev spread up
#define QP_STATS_MA_STDDEV_PEAK_UP               14  // StdDev peak up
#define QP_STATS_MA_STDDEV_DURATION_DOWN 15  // StdDev average duration down
#define QP_STATS_MA_STDDEV_SPREAD_DOWN   16  // StdDev spread down
#define QP_STATS_MA_STDDEV_PEAK_DOWN     17  // StdDev peak down
//
// Instruction array offsets
//
#define QP_INST_NUM_INST                7
#define QP_INST_STRATEGY                0
#define QP_INST_ACTION          1
#define QP_INST_PRICE           2
#define QP_INST_TIME            3
#define QP_INST_BID             4
#define QP_INST_ASK             5
#define QP_INST_POINT           6

#define QP_BASE_FORMED         107
#define QP_BASE_INDETERMINATE  108

#define QP_TIME_INDEX   0
#define QP_OPEN_INDEX   1
#define QP_LOW_INDEX    2
#define QP_HIGH_INDEX   3
#define QP_CLOSE_INDEX  4
#define QP_VOLUME_INDEX 5
//
// QP_Crossings array offsets
//
#define QP_CROSS_NUM_CROSS              8
#define QP_CROSS_AVG_SPREAD             0
#define QP_CROSS_STD_SPREAD             1
#define QP_CROSS_AVG_DURATION   2
#define QP_CROSS_STD_DURATION   3
#define QP_CROSS_AVG_SPERAD_1   4
#define QP_CROSS_STD_SPREAD_1   5
#define QP_CROSS_AVG_SPREAD_2   6
#define QP_CROSS_STD_SPREAD_2   7
//
// QP_MA_Environment definitions
//
#define QP_MAE_UP       123
#define QP_MAE_DOWN 321
#define QP_MAE_FLAT 222

=========================================================================================
quantum-prop-local.mqh
#import "Quantum-Prop-Local.ex4"
   bool Check_Available_Margin(double Initial_Balance, double Quantity);
   bool check_volatility();
#import
Files:
 
quantum123:

I didn't want them, I just wondered if you had them as the code you posted needs them . . . do you have the DLL too ?
 
Is your MT build 418 ?. Click me, click me !!!
 
RaptorUK:
I didn't want them, I just wondered if you had them as the code you posted needs them . . . do you have the DLL too ?

Yes, got them all.
 
Print the return value of .dll ?!?
 
onewithzachy:
Print the return value of .dll ?!?


I run a unit test and it works fine. I attempted to print from the init(), nothing shows. The window does not form nothing indicates a problem but it does not work

 

This is the way I see it : the .dll has 13 functions in it, but the CI call only one of them (QP_MA_Environment function). I think that what makes this CI does not works.

Where did you get this CI ?. Obviously most part of the CI is deleted. Whoever create this CI, s/he protect it, and does not want anyone else get this CI for free.

Reason: