is it possible using matlab draw trading graph with deals?

In my trading software I write myself logs like that:
634782126998342815 q 0.0156327559515302
634782126998966816 q 0.0156323845819952
634782126999122816 q 0.0156323423136646
634782126999278816 q 0.0156323634478013
634782126999434817 q 0.0156321895228581
634782126999434817 q 0.015632316326057
634782126999434817 q 0.0156320680833289
634782126999434817 q 0.0156319412841572
634782126999434817 q 0.0156320680833289
634782126999434817 q 0.0156321541605791
634782126999902817 b 0.0156321229489328
634782126999902817 q 0.0156319988296541
634782126999902817 q 0.0156318739862979
634782126999902817 q 0.0156319488920723
First column is time (it's so big because this is number of ticks elapsed from 1970 where one tick = 100 nanoseconds, just don't worry about that) Second column is operation. Either q for quote b for buy and s for sell. third column is price.
So lines with the same time should form candle. Also I need to add annotations on graph to show where I buy and sell stocks.
Without annotations I think this task is trivial for matlab, but can I add annotations in matlab? I.e. I want to have somethink like that
When I buy stock I want to display green arrow and when I sell stock I want to display red arrow. It's ok to use another symbols until they are clear and distinguishable.

 채택된 답변

Walter Roberson
Walter Roberson 2012년 7월 18일

0 개 추천

It appears to me you would like to use annotation() with either the 'arrow' or 'doublearrow' parameter.

추가 답변 (1개)

Oleg
Oleg 2012년 7월 18일

0 개 추천

thank you very much! if someone will be able to write for me matlab script to demonstrate this technic using test data I have provided in question description that would be very handy cause I'm absolutely novice in matlab. Otherwise I will try to read docs and do that myself.

댓글 수: 4

Could you explain what you mean by forming a "candle" ?
Also please take a moment to retag the Question as per my earlier comment.
that means that I can have several rows for the same X with different Y and on the graph I need to see "the range" of Y, not only first or last value. I guess that's how matlab by default will work. More information here http://en.wikipedia.org/wiki/Candlestick_chart I read article about tags right away, will retag soon.
link to wikipedia is not precise. Having candlestick chart would be perfect, but it's ok to display only "high" and "low" for each candle. (true candlestick chart also displays "open" and "close")

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Axis Labels에 대해 자세히 알아보기

제품

태그

질문:

2012년 7월 18일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by