10p horizontal gridlines

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

10p horizontal gridlines

Postby kdg9045 » Mon Oct 18, 2010 6:20 am

Hello,
Is it hard to make a 10pip horizontal grid like in this example
1.0000 - no need allready in marketscope scale
1.0010 - display line extented to the left - right graph side
1.0020 - same above
1.0030 - same above
1.0040 - same above
1.0050 - no need allready in marketscope scale
1.0060 - display line extented to the left - right graph side
1.0070 - same above
1.0080 - same above
1.0090 - same above
1.0100 - no need allready in marketscope scale
ect.
Can this be done somehow
Thanks,
regards, Karl
kdg9045
 
Posts: 4
Joined: Thu Oct 14, 2010 10:58 am

Re: 10p horizontal gridlines

Postby Apprentice » Mon Oct 18, 2010 9:19 am

Recently I wrote Rounded Number Tool (The Figure) indicator.
viewtopic.php?f=17&t=2356

I believe it will help you, if not, I'll write a new one.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: 10p horizontal gridlines

Postby kdg9045 » Mon Oct 18, 2010 10:23 am

Hi,
I allready tried to modify that 'The Figure' without success.
i seems rather difficult to me to get a grab whats happening in the lua file.
Also the main problem is that the 10pip grid should also be drawn extended to the right (into the future) like you draw a trendline for example, i don't have a clue how to achive this.
I also tried to modify the HI-LOW indicator wich is very usefull to me however i want the hi and lo values printed on the right scale instead of on the graph itself and the high low lines extended to the right.
If you could achive this i would be extremly thankfull

Thanks for your reply
regards, Karl
kdg9045
 
Posts: 4
Joined: Thu Oct 14, 2010 10:58 am

Re: 10p horizontal gridlines

Postby Nikolay.Gekht » Mon Oct 18, 2010 2:09 pm

Just to note: Marketscope grid works in a bit different way, it is not locked to the fixed pip step (for example 10 pips).

Extend line is the simple task - all you need is use right-aligned lines (-2 instead of start date and then a big number (for example 1000 pt) in size (instead of end date). So, the lines will be drawn trough the whole screen:

just replace
core.host:execute("drawLine", i, source:date(first),Level, source:date(p), Level, LC[ON],LS[ON], LW[ON]);

with
core.host:execute("drawLine", i, -2, Level, 1000, Level, LC[ON],LS[ON], LW[ON]);

Printing values on the scale is impossible. The scale is completely managed by Marketscope.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: 10p horizontal gridlines

Postby kdg9045 » Wed Oct 20, 2010 12:14 pm

hi Nikolay,
Thanks for the info.
I tried your code,
core.host:execute("drawLine", i, -2, Level, 1000, Level, LC[ON],LS[ON], LW[ON]);
and it works fine.
However now i'm trying to find out how to add 10pips horizontal lines in The Figure.lua without success.
And i also tried to drop the fractional pip values in the daily hi-low indicator, no success.
Can you point me in the right direction ?
Thanks for your assistance.
Regards, Karl
kdg9045
 
Posts: 4
Joined: Thu Oct 14, 2010 10:58 am


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Majestic-12 [Bot] and 12 guests