|
Attention! Read the forum rules carefully before posting a topic.
Try to find an answer in Wiki before asking a question. Submit programming questions in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
how to draw vertical lines in a strategy |
iulian
|
Post subject: how to draw vertical lines in a strategy |
Post rating: 0
|
Posted: Fri 05 Aug, 2011, 17:33
|
|
User rating: 1
Joined: Wed 06 Jul, 2011, 23:12 Posts: 42 Location: Romania, Bucharest
|
Hello,
Can somebody give an example about how I can allocate a value to a long type variable. For example I need to draw a vertical line in the chart today at 8:34 am GMT. How can I pass this value to a time variable. I understand that the type for a time variable is long, but what is the format in which I should write "today 8:34 am GMT" ?
public long time_stamp = ????
Thank you very much in advance!
|
|
|
|
 |
API Support
|
Post subject: Re: how to draw vertical lines in a strategy |
Post rating: 0
|
Posted: Mon 08 Aug, 2011, 07:23
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
iulian
|
Post subject: Re: how to draw vertical lines in a strategy |
Post rating: 0
|
Posted: Wed 17 Aug, 2011, 12:11
|
|
User rating: 1
Joined: Wed 06 Jul, 2011, 23:12 Posts: 42 Location: Romania, Bucharest
|
Thank you for your replay!
Still, I don't understand how can I pass a specific date and time value to the method that creates a vertical line .... For instance, in the example below got from the link you have offered, how can I replace the "tick.getTime()" with a specific date and time (for example if I want the vertical line draw at "16 august 2011, 10:15:00 am GMT"
double price1 = (tick.getAsk() + tick.getBid()) / 2; IVerticalLineChartObject vLine = chart.getChartObjectFactory().createVerticalLine("vLine", tick.getTime(), price1 ); chart.addToMainChart(vLine);
Thank you very much in advance!
|
|
|
|
 |
API Support
|
Post subject: Re: how to draw vertical lines in a strategy |
Post rating: 0
|
Posted: Wed 17 Aug, 2011, 13:04
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
iulian wrote: how can I pass a specific date and time value to the method that creates a vertical line Please see the following example strategy how to set specific date and time values: viewtopic.php?f=65&t=42103&p=53616#p53616
|
|
|
|
 |
iulian
|
Post subject: Re: how to draw vertical lines in a strategy |
Post rating: 0
|
Posted: Wed 17 Aug, 2011, 13:47
|
|
User rating: 1
Joined: Wed 06 Jul, 2011, 23:12 Posts: 42 Location: Romania, Bucharest
|
Thank you! My problem is now solved 
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|