How to code? - page 316

 
mladen:
dasio I do not know the "intention" of that line. Mathematically there is nothing wrong with that line (set the "number" to 0 and you will see that it will return exactly the same value as the Pivot which means that it works correctly, so if it is different than you expect it to be, the only part that makes the difference is the addition of "number"). What exactly are you trying to calculate with that line?

I resolve it. I put a comma instead of a point.

Thank you^^

 

Hi All. Have read the entire CG Manual for coding, and am starting to re-read it (inc lesson 3 and 8 which are relevant to my question) after making an EA, fooling around with it, fixing some bugs etc.

Here is the thing, even after all this, It still doesn't seem clear and I still can't get it into my head, the main differences of when to use:

Int

Double

Bool (I know only true or flase result, but other than that?)

and how to try and remember when to use each, especially when to use Int and not Double or vice versa

Any help appreciated.

 

Hi all.

It is possible to add the middle pivot line in this indicator?

Thank you

pivot_points_-_daily_shifted.mq4

 

Hi,

There is a function that allow me to calculate the angle of a trendline in the chart?

 

No, there is no separate function

What you can do is to create a trend line by angle (OBJ_TRENDBYANGLE) and then retrieve the angle property part of the trend line (OBJPROP_ANGLE). But, in my experience, even when you do the WindowRedraw() the information about the angle is lagging one tick (maybe they corrected it in the latest builds, but before (in the previous builds) it was like that)

dasio:
Hi, There is a function that allow me to calculate the angle of a trendline in the chart?
 

Hi,

i need a simple EA that place pending order buy and sell from high and low registered in certain time.

It is very simple to program but not for me. eheh

The external input must be:

Initial time:

Final Time:

The ea search for high and low in this time range.

Distance In PIPS: the distance for place order from high and low.

Take Profit:

Stop Loss:

Size of order.

Thank you for your disponibility

 

dasio

Did you see this thread : https://www.mql5.com/en/forum/173522 ?

dasio:
Hi,

i need a simple EA that place pending order buy and sell from high and low registered in certain time.

It is very simple to program but not for me. eheh

The external input must be:

Initial time:

Final Time:

The ea search for high and low in this time range.

Distance In PIPS: the distance for place order from high and low.

Take Profit:

Stop Loss:

Size of order.

Thank you for your disponibility
 
mladen:
dasio Did you see this thread : https://www.mql5.com/en/forum/173522 ?

Yes Mladen i see it, but i don't find what i need. Maybe they are similar but with some different.

Thank you. I will search it.

 

Hi Mladen,

The attached simple indicator is supposed to draw the close price of EURUSD on the H1 chart of any other pairs. However, despite that the correct value of the indicator shows in the data window, the indicator doesn't draw in the chart window, unless the chart window is eurusd. Can you please fix it for me ?

Thanks in advance,

pooh

Files:
eurusd_2.mq4  2 kb
 

...

pooh

It is simply because the values of different symbols can differ so much (for example GBPJPY is around 126 now and EURUSD is roughly 100 times less - when you draw those values on the same chart, the value of EURUSD is simply "out of the picture because metatrader takes GBPJPY values as a criteria for chart scaling).

Take a look at this thread : https://www.mql5.com/en/forum/178052 . There are a couple of solutions for similar problems at that thread already

pooh123:
Hi Mladen,

The attached simple indicator is supposed to draw the close price of EURUSD on the H1 chart of any other pairs. However, despite that the correct value of the indicator shows in the data window, the indicator doesn't draw in the chart window, unless the chart window is eurusd. Can you please fix it for me ?

Thanks in advance,

pooh
Reason: