|
Attention! Read the forum rules carefully before posting a topic.
Submit JForex API function requests in this forum only. Off topics are strictly forbidden.
Any topics which do not satisfy these rules will be deleted.
Please add side parameter (BID/ASK) to setTakeProfitPrice method |
frangonve
|
Post subject: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 04:14
|
|
User rating: 2
Joined: Fri 27 Jul, 2012, 07:04 Posts: 82 Location: Spain, Paracuellos de Jarama
|
Please, can you add side parameter (BID/ASK) to setTakeProfitPrice method?
Cheers
Francisco
|
|
|
|
|
mtnfx
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 06:42
|
|
User rating: 18
Joined: Thu 20 Apr, 2017, 22:42 Posts: 165 Location: Russian Federation,
|
I'm curious what logic do you have behind this request. How this should work?
|
|
|
|
|
frangonve
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 07:41
|
|
User rating: 2
Joined: Fri 27 Jul, 2012, 07:04 Posts: 82 Location: Spain, Paracuellos de Jarama
|
It goes like this:
I work with Bid charts, my calculations only use Bid prices:
I set my entry levels using Bid price: When Bid price reach X level I enter buying When Bid price reach Y level I enter selling
I set my stop loss levels using Bid price: When Bid price reach W level stop loss is triggered
But I can't use a Bid price to set my exit level with profit when I have a short trade as the TakeProfit of a short trade is triggered by Ask price.
Cheers Francisco
|
|
|
|
|
mtnfx
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 18:41
|
|
User rating: 18
Joined: Thu 20 Apr, 2017, 22:42 Posts: 165 Location: Russian Federation,
|
|
|
|
|
frangonve
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 20:57
|
|
User rating: 2
Joined: Fri 27 Jul, 2012, 07:04 Posts: 82 Location: Spain, Paracuellos de Jarama
|
<<What you are asking actually is 'close my SELL at Bid price and forget about your dummy spread just for me'.>>
No.
I know that my short trade will be closed at the ask price. But I want the closing order triggered when the Bid price of my election is reached.
Just like when I use: argument_1.setStopLossPrice(stopLoss, OfferSide.BID)
So I will pay the spread available at closing time.
Cheers
Francisco
|
|
|
|
|
mtnfx
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 22:27
|
|
User rating: 18
Joined: Thu 20 Apr, 2017, 22:42 Posts: 165 Location: Russian Federation,
|
Ok, got it. So, to be 'complete' and 'correctly understood', your very first post should be something like Quote: Please, add side parameter (BID/ASK) to setTakeProfitPrice() method with the logic similar to the one already available in IOrder.setStopLossPrice(double price, OfferSide side) and IOrder.getStopLossSide(). (PS: since such method was not created initially and was not yet added for rather loong time - probably Dukascopy has some reasoning behind it.)
|
|
|
|
|
mtnfx
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Wed 17 Oct, 2018, 22:40
|
|
User rating: 18
Joined: Thu 20 Apr, 2017, 22:42 Posts: 165 Location: Russian Federation,
|
Side note: actually this approach looks somewhat dangerous to me. There are times at market when spread become really unhealthy - just before closing for weekends and before major news. It may happen that with 'TP by bid for SELLs' you'll lose rather many pips at such moments ...
|
|
|
|
|
frangonve
|
Post subject: Re: Please add side parameter (BID/ASK) to setTakeProfitPrice method |
Post rating: 0
|
Posted: Sun 04 Aug, 2019, 06:07
|
|
User rating: 2
Joined: Fri 27 Jul, 2012, 07:04 Posts: 82 Location: Spain, Paracuellos de Jarama
|
Thanks for your post. mtnfx wrote: Side note: actually this approach looks somewhat dangerous to me. There are times at market when spread become really unhealthy - just before closing for weekends and before major news. It may happen that with 'TP by bid for SELLs' you'll lose rather many pips at such moments ... If my feature request is implemented I can send an IOrder.setTakeProfitPrice(double price, OfferSide.ASK) command when a big spread is detected/expected to reduce that risk. Cheers Francisco
Last bumped by frangonve on Sun 04 Aug, 2019, 06:07.
|
|
|
|
|
|
Pages: [
1
]
|
|
|
|
|