Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 10-19-2010, 12:38 PM   #1

Join Date: Jun 2009
Location: rovigo
Posts: 8
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Repositioning an Indicator

Hi ,

Would it be possible to move an indicator (such as moving average) in the middle of his career?
I try to explaine : a trendline drawn , if I wanted to move the move by grabbing his extreme. Here, if I wanted to move a moving average, to my knowledge, you can not because the MovAvg is anchored to the chart. I would only move the moving average and not everything that concerns the bar prices.
In addition, I would like to know if this movavg, it can not move from the extremes but in the middle or in a spot chosen by me.


Tks for help

Roberto
AntaniTheBest™ is offline  
Reply With Quote
Old 10-20-2010, 11:51 AM   #2

Join Date: Jan 2010
Location: noosa
Posts: 6
Ignore this user

Thanks: 0
Thanked 1 Time in 1 Post

Re: Repositioning an Indicator

Hi,
Not sure if I quite got what you were asking, but if you need to position a moving average around the chart you might find this indi useful.
I have made it so that you can apply horizontal and vertical shifts both positive and negative.
The chart attached shows the same indi loaded a few times with some parameters changed to show you how it can work.
Hope you find this useful.
Cheers
Brooky
Attached Thumbnails
Repositioning an Indicator-ma_mover.gif  
Attached Files
File Type: mq4 Brooky_MaMover.mq4 (2.6 KB, 3 views)
brooky29 is offline  
Reply With Quote
Old 10-20-2010, 12:37 PM   #3

Join Date: Jun 2009
Location: rovigo
Posts: 8
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Repositioning an Indicator

Quote:
Originally Posted by brooky29 »
Hi,
Not sure if I quite got what you were asking, but if you need to position a moving average around the chart you might find this indi useful.
I have made it so that you can apply horizontal and vertical shifts both positive and negative.
The chart attached shows the same indi loaded a few times with some parameters changed to show you how it can work.
Hope you find this useful.
Cheers
Brooky
Hi Brooky and tks for help.
I'm sorry, but I forgot to mention that the language on which the code was applied to EasyLanguage. :-P

Tks

Roberto
AntaniTheBest™ is offline  
Reply With Quote
Old 10-21-2010, 04:15 AM   #4

BlowFish's Avatar

Join Date: Mar 2007
Location: In Da House
Posts: 3,292
Ignore this user

Thanks: 129
Thanked 1,054 Times in 702 Posts

Re: Repositioning an Indicator

One way would be to add an offset input and add that to the average before plotting it. If you wanted to shift it left/right too you would need to add a y offset too. Something like

var: Period(13),Xoffset(0),Yof fset(0);

....code to calculate average goes here....

plot [Yoffset](MyMovingAverage+Xoffset) ;


It would not be drag and drop but it would allow you to 'nudge' the average around by changing the offset parameters.
BlowFish is offline  
Reply With Quote
Old 10-21-2010, 07:28 AM   #5

Join Date: Jun 2009
Location: rovigo
Posts: 8
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Repositioning an Indicator

Quote:
Originally Posted by BlowFish »
One way would be to add an offset input and add that to the average before plotting it. If you wanted to shift it left/right too you would need to add a y offset too. Something like

var: Period(13),Xoffset(0),Yof fset(0);

....code to calculate average goes here....

plot [Yoffset](MyMovingAverage+Xoffset) ;


It would not be drag and drop but it would allow you to 'nudge' the average around by changing the offset parameters.
Tks BlowFish ,

But if I wanted to move the point Z? I try to explain better: Y is the beginning, X is the end: Z in the middle there. That 's what I want to move, leaving intact the Y and Z points. Something like that, it can be done? Is there a way to codify?
In addition, the drag and drop is not really possible?

Tks

Roberto
AntaniTheBest™ is offline  
Reply With Quote
Old 10-21-2010, 09:02 AM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Repositioning an Indicator

Quote:
Originally Posted by AntaniTheBest™ »
Tks BlowFish ,

But if I wanted to move the point Z? I try to explain better: Y is the beginning, X is the end: Z in the middle there. That 's what I want to move, leaving intact the Y and Z points. Something like that, it can be done? Is there a way to codify?
In addition, the drag and drop is not really possible?

Tks

Roberto
why don't you post a diagram?
__________________



Only an idiot would reply to a stupid post
Tams is offline  
Reply With Quote
Old 10-21-2010, 11:49 AM   #7

Join Date: Jun 2009
Location: rovigo
Posts: 8
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Repositioning an Indicator

Quote:
Originally Posted by Tams »
why don't you post a diagram?
Hi Tams ,

in graph attached . This is an example , with polynomial predict . But it could be any other indicator .

Tks

Roberto
Attached Thumbnails
Repositioning an Indicator-example.png  
AntaniTheBest™ is offline  
Reply With Quote
Old 10-21-2010, 11:52 AM   #8

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Repositioning an Indicator

Quote:
Originally Posted by AntaniTheBest™ »
Hi Tams ,

in graph attached . This is an example , with polynomial predict . But it could be any other indicator .

Tks

Roberto
if you want to do a grab and drag,
no, it cannot be done because EasyLanguage/TS/MultiCharts is not designed for such an operation.

You might want to check out Amibroker. It has a slider where you can change a moving average period on the fly.
It could change the slope of the curve, but it still would not hold X and Y in place. To do that, you will need to re-evaluate the formula and its variables.
__________________



Only an idiot would reply to a stupid post

Last edited by Tams; 10-21-2010 at 12:04 PM.
Tams is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Volume Spike Reversal Indicator Development davem1979 Coding Forum 27 02-07-2010 04:25 AM
My Custom ThinkOrSwim TICK Indicator Predictor Market Internals 2 08-27-2009 07:01 PM
MIDAS Indicator for MT4! akifusenet Trading Indicators 4 08-21-2009 03:57 AM
Bid-Ask Pressure Indicator for Tradestation Soultrader Trading Indicators 81 08-18-2009 03:29 PM
Triangle Pattern Indicator Code Not Working clbradley Coding Forum 16 04-27-2009 08:36 PM

All times are GMT -4. The time now is 03:10 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.