|
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.
Fetch the current value of market price and multiply it with a variable |
Terry
|
Post subject: Fetch the current value of market price and multiply it with a variable |
Post rating: 0
|
Posted: Thu 21 Feb, 2013, 18:09
|
|
User rating: 0
Joined: Mon 02 Apr, 2012, 09:22 Posts: 12 Location: United Kingdom, London
|
To Dukascopy Support,
I wanted to have a take-profit which is 15 times the value of current market price. For example, if the current market price of EURUSD is 1.3225, I want the take-profit to be 15 * 1.3225 = 19.8375 pips.
I tried to code the take-profit in the following manner :
double takeProfitPrice = history.getLastTick(instr) * 15;
But there is one error displayed :
The operator * is undefined for the argument type(s) ITick, double
Kindly suggest a way by which I can get the desired take-profit.
Regards,
Terry.
|
|
|
|
 |
API Support
|
Post subject: Re: Fetch the current value of market price and multiply it with a variable |
Post rating: 0
|
Posted: Fri 22 Feb, 2013, 10:05
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|