Newbie Question

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

Newbie Question

Postby Trickie » Thu Aug 01, 2019 5:10 pm

Hello again!

Yes, I have a newbie question. I have copied and made some adjustments to the SAR indicator and it works good. Trouble is that I want to combine it with some other elements which seem to require core.Tick. As soon as I put core.Tick into the SAR indicator it doesn't work, it throws an error.

So is there any way to make this indicator work with core.Tick? That would be the ideal solution.

Alternative solution: Most of the other elements DO work correctly with core.Bar, but there are two that do not work properly. From the averages file which Apprentice kindly linked me to yesterday, MVA works OK with Bar and even updates live, but EMA and WMA do not produce the results they should and don't update live. If there is a way to make EMA & WMA work properly with core.Bar then that would do the job!

I've enclosed the two adjusted files to work from.

MyAverages.lua
(3.92 KiB) Downloaded 315 times

MySAR.lua
(6.57 KiB) Downloaded 304 times


Any ideas??

Thanks

Trickie
Trickie
 
Posts: 8
Joined: Tue Jul 30, 2019 5:05 am

Re: Newbie Question

Postby Trickie » Fri Aug 02, 2019 7:19 pm

Actually there is something else which it would be really useful to know how to do!

I want to "redesign" the Cursor Data. I know how to draw fixed labels on the screen, but how can I work out which period, if any, the cursor is over? I'll need this in order to print the right data of course.

It would also be useful to know how to draw a solid background behind my text. At the moment it's just "on the chart", it would be nice to separate it a little.

I have searched for anything relating to Cursor Data or Location and backgrounds but not found anything, so I need to ask, sorry!

Thanks

Trickie
Trickie
 
Posts: 8
Joined: Tue Jul 30, 2019 5:05 am

Re: Newbie Question

Postby Apprentice » Sun Aug 04, 2019 8:39 am

MVA requires a tick source.
If for any reason, the bar is available,
simply, specify any of the bar components as an MVA source.
For example.
source.close
or source.typical
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Newbie Question

Postby Apprentice » Sun Aug 04, 2019 8:41 am

Actually there is something else which it would be really useful to know how to do!

I want to "redesign" the Cursor Data. I know how to draw fixed labels on the screen, but how can I work out which period, if any, the cursor is over? I'll need this in order to print the right data of course.

It would also be useful to know how to draw a solid background behind my text. At the moment it's just "on the chart", it would be nice to separate it a little.

I have searched for anything relating to Cursor Data or Location and backgrounds but not found anything, so I need to ask, sorry!


Will this be indicator data or?
Can you provide an actual example, we can code for you.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36435
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Newbie Question

Postby Trickie » Thu Aug 08, 2019 2:23 pm

First issue resolved! Thanks Apprentice!!

I was just after some code to go in the indicator, to identify which period the cursor is curently over (like when viewing Cursor Data) so that I could draw some text relating to that period on the left of the chart and not have to view the Cursor Data window.

Thanks

Trickie
Trickie
 
Posts: 8
Joined: Tue Jul 30, 2019 5:05 am


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: Bing [Bot] and 24 guests

cron