Click here to Login





                                                   heiken ashi

  0

0
allan nathan
2012-10-03 16:58:19


hi,
I plotted a simple indicator to show when the heiken ashi close>heiken ashi open

HaOpen = (Ref( Close, 1 )+ Ref(Open,1))/2;
haclose=(open+high+low+close)/4;
Hatrue = Iff(haclose > haopen,1,0);
Plot(Hatrue,"Hatrue",colorRed,ChartLine);
UpdateColor(haclose>haopen,blue);

The problem is,my code does not match up with the default heken ashi chart provided by QS.YFrom visual inspection,its clear we are defining things a bit differently.
There are many versions of code for heiken ashi depending on
how one uses modifiedclose and opens in the formula.could you tell me how you define HaOpen and Haclose?

also,when i plot,is there an option to plot "candles" as in stylecandle?

Allan





QuantShare
2012-10-03 18:54:04

  0

Hi,

HaClose is the same.
HaOpen = 0.5 * HaClose + 0.5 * Ref(Open,1);

To plot candles, type your "heiken ashi" formula and use Bar chart style.



allan nathan
2012-10-03 19:28:01

  0

where can i read on plotstyle options?
i cant find anything

Allan



QuantShare
2012-10-04 10:57:36

  0

To change a chart style, select "View -> Chart Style".


allan nathan
2012-10-04 13:30:24

  0

thank you,but i am referring to formulas such as

Plot(op1, name()."/".symbol1, colorBlack, ChartLine, StyleSymbolNone);

and specifically Charline,Stylesymbolnone

Is there any documentation on the various Plot options?










QuantShare
2012-10-04 13:51:04

  0

Best Answer
Click on "ChartLine" text then use CONTROL+SPACE to display the list of available options.


allan nathan
2012-10-04 16:39:49

  0

Thank you,thats helpful..are there any definitions for the "Style"?
Is it necessary to indicate "Style"


Thank you,

Allan



QuantShare
2012-10-04 17:44:42

  0

You can use the same CONTROL+SPACE shortcut to show different styles.


allan nathan
2012-10-04 22:20:21

  0

Hi,
I found all the answers to Plot in the QS Documentation under Charting sec 1.3
Thanks for all the help

Allan



allan nathan
2012-10-06 15:44:04

  0

what do you use for hahigh and halow?

I use

HaHigh = Max( High, Max( HaClose, HaOpen ) );
HaLow = Min( Low, Min( HaClose, HaOpen ) );



GS
2012-10-07 05:42:46

  0


allan nathan
2012-10-07 15:13:15

  0

If I reference the formula in the link vs the Heiken Ashi Chart in QuantShare,there appears to be a one day mismatch in the HaOpen between the formula below and the Open on the default Heiken AQshi chart.Specifically,the HaOpen on the default chart does not equal the HaOpen from the formula below.The OPEN of the default Chart i= the HaOpen of the formula below for the next day.It is off by one day.That affects all the other values.If one plots the formula below on a candlestick chart(not Heiken ashi),and compares that with the default Heiken Ashi,you should notice the one day discrepency

HaClose = (open + high + low + close)/4;
HaOpen = AMA( Ref( HaClose, 1 ), 0.5 );
HaHigh = Max( high, Max( HaClose, HaOpen ) );
HaLow = Min( low, Min( HaClose, HaOpen ) );
xDiff = (HaHigh - Halow) * 10000;
PlotCandleStick1( HaOpen, HaHigh, HaLow, HaClose, "", colorRed, StyleSymbolNone );
UpdateColor(HaClose >= HaOpen, colorGreen);




allan nathan
2012-10-07 15:23:22

  0

Please note,the formula QS gave for HaOpen

HaOpen = 0.5 * HaClose + 0.5 * Ref(Open,1);

does not appear to match the formula in the link

HaOpen = AMA( Ref( HaClose, 1 ), 0.5 );


Allan



GS
2012-10-07 15:55:28

  0

I agree and only QS can answer, because both the formulae are suggested by QS.

Thanks for pointing this out, appreciated.



No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Price Channel Position
Historical Stock Market News
Rosenberg Sentiment Index
Percentage of Stocks that are trading between their 50 and 200-da...
Low Risk Entry (BULLISH)

How-to Lessons
How to synchronize stock charts?
How to drag & drop a stock to a static watchlist
How to debug a trading system using the money management tool
How to display notes/commentaries on a chart
How to create trading rules based on Put and Call volume data

Related Forum Threads
Heiken ashi and Renk chart types in stratregy code?
Heikin Ashi Oscillator
chart types
Heikin Ashin RSI crossover
How can I rename a downloader

Blog Posts
Create custom metrics for the statistical data analysis tool
How to Backtest a Strategy from a Chart
How to Pick the Best Trend Indicators
Forecast volatility using trading rules and neural networks
3 ways to rank stocks in a trading system - Simulator and Potfoli...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.