Need some advise on mql coding in fibo indicator

Post Reply
profuse
Trader
Posts: 14
Joined: Tue Jan 01, 2013 10:22 pm

Need some advise on mql coding in fibo indicator

Post by profuse »

Hello,

I'm using several range levels in my trading, and plot them using an indicator. The indicator is developed to plot fibonacci levels with a maximum on choices %'s, color, etc. Big advantage is that when applied to the chart you have it always as you want it, including the levels where to start with and the names (labels) given to those levels.

I tried to get the labels in front of the candles (at the right side), instead of IN the candles as it is now.

Can someone give me a hint on how to go about? Or help to get it done?


Regards,

Ben
You do not have the required permissions to view the files attached to this post.
phil_trade

Re: Need some advise on mql coding in fibo indicator

Post by phil_trade »

profuse wrote:Hello,

I'm using several range levels in my trading, and plot them using an indicator. The indicator is developed to plot fibonacci levels with a maximum on choices %'s, color, etc. Big advantage is that when applied to the chart you have it always as you want it, including the levels where to start with and the names (labels) given to those levels.

I tried to get the labels in front of the candles (at the right side), instead of IN the candles as it is now.

Can someone give me a hint on how to go about? Or help to get it done?


Regards,

Ben
Hi

Could you provide a picture of what you want on a graph ? I only see Line when I apply this indicator ?

If label are drawn on candle, it's due to

Code: Select all

ObjectCreate(name, OBJ_TEXT, 0, Time[0], lvl);


if you are in H1, may be you could try Time[0] + 3600

Philippe
profuse
Trader
Posts: 14
Joined: Tue Jan 01, 2013 10:22 pm

Re: Need some advise on mql coding in fibo indicator

Post by profuse »

Thanks Phillipe for replying so rapid!

This is what I'm looking for: http://screencast.com/t/gpYIxolfgPQa ; shift the Line Labels to the right.

If take the indicator into a EURUSD chart and go to settings, and put 1.3814 in BaseLine, you'll get the same picture.

I will try what you suggested and come back if it was of help.
Thanks!!! Much appreciated!

Regards,

Ben
phil_trade

Re: Need some advise on mql coding in fibo indicator

Post by phil_trade »

profuse wrote:Thanks Phillipe for replying so rapid!

This is what I'm looking for: http://screencast.com/t/gpYIxolfgPQa ; shift the Line Labels to the right.

If take the indicator into a EURUSD chart and go to settings, and put 1.3814 in BaseLine, you'll get the same picture.

I will try what you suggested and come back if it was of help.
Thanks!!! Much appreciated!

Regards,

Ben
Ok so I confirm this is working :

Code: Select all

void drawLabel(string name,double lvl,color Color)
{
    if(ObjectFind(name) != 0)
    {
        ObjectCreate(name, OBJ_TEXT, 0, Time[0]+(60 * Period() * 10), lvl);
        ObjectSetText(name, name, 8, "Arial", EMPTY);
        ObjectSet(name, OBJPROP_COLOR, Color);
    }
    else
    {
        ObjectMove(name, 0, Time[0]+(60 * Period() * 10), lvl);
    }
}
You can reduce Right Shift by decreasing * 10

cheers

Philippe
profuse
Trader
Posts: 14
Joined: Tue Jan 01, 2013 10:22 pm

Re: Need some advise on mql coding in fibo indicator

Post by profuse »

Hi Philippe,

GREAT!, Thanks a lot. It works perfect now.
Have a nice weekend.

Regards,

Ben
You do not have the required permissions to view the files attached to this post.
profuse
Trader
Posts: 14
Joined: Tue Jan 01, 2013 10:22 pm

Re: Need some advise on mql coding in fibo indicator (again)

Post by profuse »

Hello,

In October I had great help from Phil_trade in getting textlabels at the right spot.

Now that I'm tweaking the indicator I got in some trouble with htose same labels :? .
I started with the indicator uphere as it worked properly. I added levels and all of a certain it starts leaving out the labels but not all. Most of the time it gives the lower labels as it should but the upper are either absent completely or just random some pop up...???

I've tried all kind if tricks, redid the whole thing, changed the order and what not.

Maybe it can't just handle more then sat 12 lines including labels (the lines are drawn without any exception though).

This is how it looks like: http://screencast.com/t/qrjVZrnEg9

I hope some ones amongst us can give me a hand, or just some idea's, tricks, in a way that I can do it myself.

Thanks beforehand

Ben
You do not have the required permissions to view the files attached to this post.
profuse
Trader
Posts: 14
Joined: Tue Jan 01, 2013 10:22 pm

Re: Need some advise on mql coding in fibo indicator

Post by profuse »

Hi,

Problem solved. Found out that the Labels need to have differences between above and below the 'base'; adding an 'r' at the plus %'s and a 's' in the minus %'s was enough!

Took me 3 days to find out :oops:

I need some other help in the same indicator but will open a new thread for that.

Regards,
Ben
Post Reply

Return to “Indicators”