[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 786

 
webgreck:

Please tell me how to do the following operation for example :

double j= 7/3;

get 2.33 instead of 2 ?

Is it necessary to enter the variable j into string type and take out this value, or is there a simpler way?


double j= 7.0/3.0;
 
Vinin:


Thanks ) I thought it was very simple...
 

In a for loop - what happens when dx=0 ?

for(int cnt_TimeClose=0; cnt_TimeClose<dx; cnt_TimeClose++) {

[Thought it would be ignored, but it's not.]

 

Can you please tell me if it is possible to make 1 indicator to display its values in the main window and in a separate window?

For example, to draw exrema on the chart and display any other results but in a separate window.

If it is possible, how ?

 
Indicator buffers can only be drawn in a single window. But nobody forbids to put graphical objects from a separate indicator in the main window. As, for example, is done in the DM_35 indicator.
 
chief2000:

In a for loop - what happens when dx=0 ?

[Thought it would be ignored, but it's not.]


Get around the glitch:

if(dx>0){

for()....

}

 
drknn:


Get around the glitch:

if(dx>0){

for()....

}

In EA, dx is an external variable. During optimization I set its initial value =0 and

For this value I got the best results both in Drawdown and Profit (with the same amount of trades).

The results do not come close to this value with other values of the parameter.

Here, I've become eerily curious about this strange glitch :)

 
chief2000:

In EA, dx is an external variable. During optimization I set its initial value =0 and

For this value I got the best results both in Drawdown and Profit (with the same amount of trades).

The results do not come close to this value with other values of the parameter.

Here, I've become eerily curious about this strange glitch :)


You have to see all the code for that. Otherwise it makes no sense. But you can just put it on a demo for a month.
 
Vinin:

You need to see all the code for that. Otherwise it makes no sense. But you can just put it on demo for a month.

I'll start outputting variable values via comments a bit later, maybe something will become clearer.

At the very least, we'll have to make a mini-advisor for the for-cycle and observe the values.

 

hello....

i decided to start learning mql4 (i'm a complete beginner in this business) but i found the mql5 language.... can someone tell me what the main differences are.... and if i'm starting from scratch, which language is better to use? .... thanks for answers

Reason: