Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Nymphodora), 972 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
OrderLimit support and behaviour #471441
03/04/18 13:23
03/04/18 13:23
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Does the FXCM API support OrderLimit? If not is there any broker known that does?

As far as I know something like this should be prevented by OrderLimit or is it still a matter of slippage? From trade log:
Code:
[1158: Fri 18-03-02 14:17:01] (1.37795)
2018-03-02 14:17:55.4555
Asset: GBPUSD_FXCM, Price: 1.37750, Spread: 0.00001, Commission: 0.00007
OrderLimit: 1.37746
[GBPUSD_FXCM::S5254] Short 1@1.37694  at 14:17:55.


Is there a chance to simulate OrderLimit if it is not directly supported by the API or on MT4 accounts?

Thanks, Sphin

Re: OrderLimit support and behaviour [Re: Sphin] #471458
03/05/18 13:15
03/05/18 13:15
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
You limit order to sell was below Bid and so got immediately converted into market.
Which - given your latency and a fast falling market - resulted in a significant slippage.

This would happen regardless of the broker/API.

Frequency of price updates from the API is another thing that will influence this behaviour(to be changed via TickTime).

Re: OrderLimit support and behaviour [Re: Zheka] #471469
03/05/18 16:46
03/05/18 16:46
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Sure?
Quote:
OrderLimit
Send a limit order at the given limit price, instead of a market order, to the broker at the next enterLong or enterShort call. This is different to an Entry limit. It does not produce a pending trade, but cancels the order if it is not filled within a few seconds, dependent on broker API. If the broker API supports limit orders, this guarantees a fill price at or better than the limit. [...]

Re: OrderLimit support and behaviour [Re: Sphin] #471471
03/05/18 17:50
03/05/18 17:50
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I am not familiar with nuances of FXCM plug-in.

But logically:

- if the plug-in does not support OrderLimit, then most probably the order went as just the market order

- if the plug-in does or were to support OrderLimit, then the order would be directly sent as 'limit' to the broker, where it would be subject to the usual limit order handling rules I described above.

Re: OrderLimit support and behaviour [Re: Zheka] #471474
03/05/18 18:35
03/05/18 18:35
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Logically I would say that
Quote:
if the plug-in does or were to support OrderLimit, then the order would be directly sent as 'limit' to the broker, where it would be subject to the usual limit order handling rules I described above.

and
Quote:
If the broker API supports limit orders, this guarantees a fill price at or better than the limit.

are not the same. The usual limit behaviour should be already covered by 'Entry', at least it is explained in the manual similar to your description. But who knows.

Re: OrderLimit support and behaviour [Re: Sphin] #471477
03/05/18 19:54
03/05/18 19:54
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
Quote:
If the broker API supports limit orders, this guarantees a fill price at or better than the limit
This will normally be true if the limit price is "same or better" than the current.
But in this case it was "worse".
So, the order - already at the broker - got converted to market BY THE BROKER (nothing Zorro can do about it by then).
And in a fast falling market (with liquidity quickly removed on the bid side, i.e.bid price falling even faster) and with latency, you got 'slipped' vs the desired limit price.

Change the limit price to bid-ask mid-point. OrderLimit will then work as intended: if not executed quickly, the order will get cancelled and you can resubmit it again to chase the moving price but still guarantee favourable execution.

Re: OrderLimit support and behaviour [Re: Zheka] #471500
03/06/18 19:07
03/06/18 19:07
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
If it works this way then it does.

My intention was to sell only if I get at least 1.37746 otherwise cancel the trade. But this is only possible if the actual bid is below my limit otherwise sending a market order has the same effect? That's bad because I simply don't know if the next price is above or below it so I have to guess. There is no other chance to realize this?

Re: OrderLimit support and behaviour [Re: Sphin] #471519
03/07/18 10:26
03/07/18 10:26
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
What happened is quite a rare event, a very special case.
Had the movement been less swift, you would get executed at "market" - which will be better than 1.37746...
Of course, if the strategy is to trade around "news", then such situations might be happening more often.
Please give more details of a typical situation/approach.

What will help in any case is reducing latency between you and the broker, including: server location, frequency of price updates by Zorro, tuning of NIC/OS settings, efficiency of code, CPU speed.

Re: OrderLimit support and behaviour [Re: Zheka] #471531
03/07/18 18:37
03/07/18 18:37
Joined: Dec 2013
Posts: 568
Fuerth, DE
Sphin Offline OP
User
Sphin  Offline OP
User

Joined: Dec 2013
Posts: 568
Fuerth, DE
Quote:
Change the limit price to bid-ask mid-point

I hope to do it right but there seems to be not the desired effect:

2018-03-06 11:22:39.994
Asset: EURUSD_FXCM, Price: 1.23605, Spread: 0.00002, Commission: 0.00007
OrderLimit: 1.23604
[EURUSD_FXCM::L8224] Long 1@1.23701 at 11:22:40.

2018-03-07 09:17:29.427
Asset: GBPUSD_FXCM, Price: 1.38658, Spread: 0.00002, Commission: 0.00007
OrderLimit: 1.38657
[GBPUSD_FXCM::S6627] Short 1@1.38636 at 09:17:29

Do I have to set also a value for Entry when using OrderLimit? Up to now I didn't.

Re: OrderLimit support and behaviour [Re: Sphin] #471533
03/07/18 19:59
03/07/18 19:59
Joined: Jul 2017
Posts: 783
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 783
I do not think you need Entry with OrderLimit; but you can experiment with Entry instead of OrderLimit.

The above is strange. Need to ask support if/how exactly Limit orders are supported with FXCM.
What if you set OrderLimit price 1 pip below bid (for long) in a calm market? Will it work properly at all?

What's your latency to FXCM server?

Page 1 of 2 1 2

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1