MetaStock™ Zone Forum & FAQ Artykuły Linki Elliott Waves EasyLanguage™ Zone

A B C D E F G H I J K L M N O P R S T U V W Y Z #

Displace Indicator Forward

From: dom1_1998 <dominick / at / bee.net>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Friday, March 7, 2003, 10:58:00 PM
Subject: [EquisMetaStock Group] R1 I created 6 variables titled r1,r2 etc etc.

How can I shift these one bar forward?

TIA,

Dominick

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: Joe J. <jojab / at / aztar.com>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Friday, March 7, 2003, 11:06:26 PM
Subject: [EquisMetaStock Group] R1

Use the ref() command. If you want the last bar's value posted on the current bar, use ref(R1,-1).

Good Trading,

Joe J.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: dom1_1998 <dominick / at / bee.net>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Friday, March 7, 2003, 11:14:53 PM
Subject: [EquisMetaStock Group] RE: R1

Thanks for the quick reply Joe.

I need the current bar's indicator shifted one bar forward in order to see the range for tomorrow.

TIA,

Dominick

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: Ron <ronber / at / earthlink.net>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Friday, March 7, 2003, 11:20:31 PM
Subject: [EquisMetaStock Group] RE: R1

maybe this will help

ref(whatever,+1)

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: dom1_1998 <dominick / at / bee.net>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Friday, March 7, 2003, 11:24:50 PM
Subject: [EquisMetaStock Group] RE: R1

Hi Ron:

The + sign sent the indicator backwards. The - sign still causes the indicator to end on the last bar. I need to project the indicator forward.

TIA,

Dominick

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: Joe J. <jojab / at / aztar.com>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Friday, March 7, 2003, 11:44:11 PM
Subject: [EquisMetaStock Group] RE: R1

MS won't show the next bar's indicators before the bar itself starts. That is why I was saying that if you want to see the prior bar's value on the current bar, use the -1. Regardless, you won't see the current bar's value until the next bar starts. This works okay for RT charts but if you are working with EOD, it is not the way to go. You're better off just plotting the indicator as is with no shift.

Good Trading,

Joe J.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

From: Roy Larsen <rlarsen / at / man.quik.co.nz>
To: equismetastock / at / yahoogroups.com <equismetastock / at / yahoogroups.com>
Date: Saturday, March 8, 2003, 6:17:50 AM
Subject: [EquisMetaStock Group] RE: R1

Guys

It's easy enough to partially meet both the requirement to see what the "shifted forward" indicators value is for tomorrow, but on the current bar, AND see the shifted indicator where you want it for all bars other than the most recent. This is a compromise but as Joe has said in essence "no data - no indicator"

 


Displace Indicator Forward

Signal:=Mov(C,20,S);
Dsp:=Input("Displacement Periods",1,250,1);
Pds:=Input("LastValue Periods",1,250,5);
LastBar:=LastValue(Cum(1)-(Pds-1))=Cum(1);
ValueWhen(1,LastBar,LastValue(Signal));
Ref(Signal,-Dsp);

 

 
e-w-Displace_Indicator_Forward.gif
 

From this example two values can be viewed on the last bar. If there's a better way to do this without spending money I'd be glad to hear about it. I'd also like to hear why this work-around (this not a fix) can't be used if it's thought to be unhelpful.

Roy

 

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

To displace an indicator forward, you use Ref(myInd,-p).
The median and typical prices are built-in functions -- MP() is (H+L)/2 and typ() is (H+L+C)/3.

For MP, use


Displace Indicator Forward

Period:= Input("What Period",1,250,10);
Disp:= Input("Forward Displacement",0,250,10);
EMA1:= Mov(MP(),Period,E);
EMA2:= Mov(EMA1,Period,E);
Difference:= EMA1 - EMA2;
ZeroLagEMA:= EMA1 + Difference;
Ref(ZeroLagEMA,-Disp)

 

e-w-Displace_Indicator_Forward.gif
from Bob Jagow
Source / From: TOP
http://www.guppytraders.com

Equis and MetaStock® and MetaStock Professional® are registered trademarks of Equis International. Achelis Binary Wave®, The DownLoader®,
Expert Advisor®, OptionScope®, Quotecenter® and Smart Charts® are trademarks of Equis International, a Thomson Reuters company.

TradeStation® Pro, TradeStation® 2000i, OptionStation®, SuperCharts®, PowerEditor® and EasyLanguage®
are registered trademarks of TradeStation Technologies, Inc. Other names and marks referred to are the property of their respective owners.

All information provided on this website is for educational purposes only. Trading involves risk, including possible loss of principal and other losses.

Ten i inne materiały na tej stronie zostały zamieszczone zostały jedynie w celach edukacyjnych, nie ponoszę żadnej odpowiedzialno¶ci za ich stosowanie.

Gra na giełdzie i rynkach walutowych (FOREX) niesie ze sob± ryzyko poważnych strat finansowych!