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 #

Price - Stepped by Jose Silva

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: tan ming <reminiscenostalgia [at] hotmail [dot] com>
To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Date: Wednesday, October 5, 2005, 1:48:32 PM
Subject: [EquisMetaStock Group] Step Look Coding
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Does anyone knows how to code an indicator in step looking form instead of joining two points together? Any code which is versatile to adapt to other indicators into step form will be nice. Tks.

Regards.
Dan

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
From: Jose Silva <josesilva22 [at] yahoo [dot] com>
To: equismetastock [at] yahoogroups [dot] com <equismetastock [at] yahoogroups [dot] com>
Date: Wednesday, October 5, 2005, 2:18:35 PM
Subject: [EquisMetaStock Group] Stepped output indicator
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Below is an example of stepped-output MS code - handy for quantizing indicator output values, such as support & resistance when using price (Close).


Price - Stepped

{ (c) Copyright 2005 Jose Silva
For personal use only
http://www.metastocktools.com }

{ User input }
step:=Input("Step size % [0~100]",0,100,0.5);

{ Data array or indicator }
x:=C;

{ Stepped data array }
step:=1/Max(step,.000001);
stepX:=Int(x*step+.5)/step;

{ Plot in own window }
stepX

Source / From: TOP
Metastockusers [at] yahoogroups [dot] 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!