Re: Coding Help

#231
Yes, thank you! I'm trying to do such a thing

Code: Select all

HistoUp[i] = EMPTY_VALUE; HistoDn[i] = EMPTY_VALUE;
if (A < B) {HistoUp[i] = 1; HistoDn[i] = EMPTY_VALUE;}
if (A > B) {HistoDn[i] = 1; HistoUp[i] = EMPTY_VALUE;}
but it doesn't work... :-(


Re: Coding Help

#232
wojtek wrote:
Fri May 05, 2017 3:40 am
Yes, thank you! I'm trying to do such a thing

Code: Select all

HistoUp[i] = EMPTY_VALUE; HistoDn[i] = EMPTY_VALUE;
if (A < B) {HisotUp[i] = 1; HistoDn[i] = EMPTY_VALUE;}
if (A > B) {HistoDn[i] = 1; HistoUp[i] = EMPTY_VALUE;}
but it doesn't work... :-(
It should work
You have to check the rest of your code, since that code block is OK

Re: Coding Help

#233
Yes, right!!! I found the mistake, The old buffers are involved in calculating,
so I must define the two new buffers for a histo in the separate window.

Re: Coding Help

#234
Dearest Mladen,
We are facing a problem with "iCustom" for ptl 2_2.mq4 indicator ... The problem appears with the parameter
"extern enDisplay DisplayWhat = dis_line; // Display type" ... the iCustom is written as follows :
iCustom(NULL,0,"ptl 2_2",
TimeFrame,SlowPipDisplace,FastLength,FastPipDisplace,false,false,false,false,false,dis_line,Interpolate,0,i);
Could you please give us your correcting suggestion ?????
Thank you in advance as always.
Best Regards
Dimitri

Re: Coding Help

#235
I suppose you should write 1 instead of 'dis_line',
because that (listing) variable is an integer type (with 0).


Re: Coding Help

#236
wojtek wrote:
Sat May 06, 2017 11:12 pm
I suppose you should write 1 instead of 'dis_line',
because that (listing) variable is an integer type (with 0).
Dear wojtek, thank you for your kind reply. I have followed your instruction but the result is not achieving requested operation.
Waiting for additional help ... Thank you anyway ....
Best Regards
Dimitri

Re: Coding Help

#237
Dimitri wrote:
Sat May 06, 2017 9:56 pm
Dearest Mladen,
We are facing a problem with "iCustom" for ptl 2_2.mq4 indicator ... The problem appears with the parameter
"extern enDisplay DisplayWhat = dis_line; // Display type" ... the iCustom is written as follows :
iCustom(NULL,0,"ptl 2_2",
TimeFrame,SlowPipDisplace,FastLength,FastPipDisplace,false,false,false,false,false,dis_line,Interpolate,0,i);
Could you please give us your correcting suggestion ?????
Thank you in advance as always.
Best Regards
Dimitri
You have to include the enum (the enDisplay) in the code somewhere and it should work OK then

Re: Coding Help

#238
mladen wrote:
Sat May 06, 2017 11:38 pm
Dimitri wrote:
Sat May 06, 2017 9:56 pm
Dearest Mladen,
We are facing a problem with "iCustom" for ptl 2_2.mq4 indicator ... The problem appears with the parameter
"extern enDisplay DisplayWhat = dis_line; // Display type" ... the iCustom is written as follows :
iCustom(NULL,0,"ptl 2_2",
TimeFrame,SlowPipDisplace,FastLength,FastPipDisplace,false,false,false,false,false,dis_line,Interpolate,0,i);
Could you please give us your correcting suggestion ?????
Thank you in advance as always.
Best Regards
Dimitri
You have to include the enum (the enDisplay) in the code somewhere and it should work OK then
Dear Mladen,
Thank you for your kind reply ....
Just to clarify if it is well understood ....

I have to copy & paste following part of the code ...

enum enDisplay
{
dis_bars, // Display bars
dis_line, // Display lines
dis_arro, // Display arrows
dis_barl, // Display bars and lines
dis_bara, // Display bars and arrows
dis_lina, // Display lines and arrows
dis_all // Display bars, lines and arrows
};
The parameters to be called are ....

extern ENUM_TIMEFRAMES TimeFrame = PERIOD_CURRENT; // Time frame to use
extern int SlowLength = 7; // Slow length
extern double SlowPipDisplace = 0; // Slow pips displacement
extern int FastLength = 3; // Fast length
extern double FastPipDisplace = 0; // Fast pips displacement
//extern bool AlertsOn = false; // Turn alerts on?
//extern bool AlertsOnCurrent = true; // Alerts on current (still opened) bar?
//extern bool AlertsMessage = true; // Alerts should display pop-up message?
//extern bool AlertsSound = false; // Alerts should play a sound?
//extern bool AlertsEmail = false; // Alerts should send email?
//extern enDisplay DisplayWhat = dis_line; // Display type
extern bool Interpolate = true; // Interpolate in multi time frame mode?

and the iCustom should be like this .... ????????????

iCustom(NULL,0,"ptl 2_2",TimeFrame,SlowPipDisplace,FastLength,FastPipDisplace,false,false,false,false,false,dis_line,Interpolate,0,i);

Sorry, but we have no programming knowledge, and we try to give some solutions ....
Waiting for your help ....
Best Regards
Dimitri

Re: Coding Help

#239
Dimitri wrote:
Sat May 06, 2017 11:48 pm
mladen wrote:
Sat May 06, 2017 11:38 pm


You have to include the enum (the enDisplay) in the code somewhere and it should work OK then
Dear Mladen,
Thank you for your kind reply ....
Just to clarify if it is well understood ....

I have to copy & paste following part of the code ...

enum enDisplay
{
dis_bars, // Display bars
dis_line, // Display lines
dis_arro, // Display arrows
dis_barl, // Display bars and lines
dis_bara, // Display bars and arrows
dis_lina, // Display lines and arrows
dis_all // Display bars, lines and arrows
};
The parameters to be called are ....

extern ENUM_TIMEFRAMES TimeFrame = PERIOD_CURRENT; // Time frame to use
extern int SlowLength = 7; // Slow length
extern double SlowPipDisplace = 0; // Slow pips displacement
extern int FastLength = 3; // Fast length
extern double FastPipDisplace = 0; // Fast pips displacement
//extern bool AlertsOn = false; // Turn alerts on?
//extern bool AlertsOnCurrent = true; // Alerts on current (still opened) bar?
//extern bool AlertsMessage = true; // Alerts should display pop-up message?
//extern bool AlertsSound = false; // Alerts should play a sound?
//extern bool AlertsEmail = false; // Alerts should send email?
//extern enDisplay DisplayWhat = dis_line; // Display type
extern bool Interpolate = true; // Interpolate in multi time frame mode?

and the iCustom should be like this .... ????????????

iCustom(NULL,0,"ptl 2_2",TimeFrame,SlowPipDisplace,FastLength,FastPipDisplace,false,false,false,false,false,dis_line,Interpolate,0,i);

Sorry, but we have no programming knowledge, and we try to give some solutions ....
Waiting for your help ....
Best Regards
Dimitri
Dimitri

Yes, you have to have that part of code in your code too (this part :

Code: Select all

enum enDisplay
{
   dis_bars,  // Display bars
   dis_line,  // Display lines
   dis_arro,  // Display arrows
   dis_barl,  // Display bars and lines
   dis_bara,  // Display bars and arrows
   dis_lina,  // Display lines and arrows
   dis_all    // Display bars, lines and arrows
};

Re: Coding Help

#240
Dimitri wrote:
Sat May 06, 2017 11:25 pm
Dear wojtek, thank you for your kind reply. I have followed your instruction but the result is not achieving requested operation.
Waiting for additional help ... Thank you anyway ....
Best Regards
Dimitri
OK, it would work if you declare

Code: Select all

// extern 
             int DisplayWhat  = 1;
I remember I used it in the iCustom function for enumerative variables in ex4 indicators.


  1. Similar Topics

    1. Coding help please

      1 Replies 529 Views

      by Deez, Thu Nov 05, 2020 6:54 pm in Coding Help

      1 Replies
      529 Views
    2. CODING HELP

      0 Replies 1097 Views

      by slyfer91, Sun Apr 25, 2021 6:43 am in Coding Help

      0 Replies
      1097 Views
    3. Paid Coding

      1 Replies 669 Views

      by mecca, Sun Sep 27, 2020 9:31 am in Express Coding & Commercial Services

      1 Replies
      669 Views

Return to “Coding Help”