Replies

rmssf
12 Sep 2016, 11:37

RE: RE: RE:

No, you get 2 streams, one message for each symbol and properly identified with the symbol id.

mclskan said:

rmssf said:

mclskan said:

Is there a way I can get multiple currency data besides just one ?

 

In the same session or in separate sessions?

 

in the code I send can I somehow add new instrument there or I can copy paste and do for second instrument also?

I can probably copy paste and get the second instrument also but is there a chance with just one marketdatarequest I can get 2 instrument in one message.

 


@rmssf

rmssf
12 Sep 2016, 11:34

Example for same session (easiest):

 

        private void QueryMarketDataRequest()
        {
            QuickFix.FIX44.MarketDataRequest m1 = QueryMarketDataRequest44("EURUSD", "1", 1);
            QuickFix.FIX44.MarketDataRequest m2 = QueryMarketDataRequest44("GBPAUD", "16", 1);

            if (m1 != null )
                SendMessage(m);
            if (m2 != null)
                SendMessage(m2);
        }


        private QuickFix.FIX44.MarketDataRequest QueryMarketDataRequest44(string id, string symbol, int type)
        {
            MDReqID mdReqID = new MDReqID(id);
            SubscriptionRequestType subType = new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES);
            MarketDepth marketDepth = new MarketDepth(type);

            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup marketDataEntryGroup = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            marketDataEntryGroup.Set(new MDEntryType(MDEntryType.BID));

            QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup symbolGroup = new QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup();
            symbolGroup.Set(new Symbol(symbol));

            QuickFix.FIX44.MarketDataRequest message = new QuickFix.FIX44.MarketDataRequest(mdReqID, subType, marketDepth);
            message.AddGroup(marketDataEntryGroup);
            message.AddGroup(symbolGroup);

            return message;
        }

 


@rmssf

rmssf
12 Sep 2016, 11:28

RE:

mclskan said:

Is there a way I can get multiple currency data besides just one ?

 

In the same session or in separate sessions?

 


@rmssf

rmssf
12 Sep 2016, 10:26

Your code above is subscribing to market depth (full book):

MarketDepth marketDepth = new MarketDepth(0);

 

To subscribe to spot only (top of book):

MarketDepth marketDepth = new MarketDepth(1);

 


@rmssf

rmssf
12 Sep 2016, 00:28

I just tried using your code without any modification, it works fine and still without seeing field 272.

It must be something you have there upstream.


@rmssf

rmssf
11 Sep 2016, 23:55

Can you try with this:

 

            MDReqID mdReqID = new MDReqID("MARKETDATAID");
            SubscriptionRequestType subType = new SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT_PLUS_UPDATES);
            MarketDepth marketDepth = new MarketDepth(0);

            QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup marketDataEntryGroup = new QuickFix.FIX44.MarketDataRequest.NoMDEntryTypesGroup();
            marketDataEntryGroup.Set(new MDEntryType(MDEntryType.BID));

            QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup symbolGroup = new QuickFix.FIX44.MarketDataRequest.NoRelatedSymGroup();
            symbolGroup.Set(new Symbol("1"));

            QuickFix.FIX44.MarketDataRequest message = new QuickFix.FIX44.MarketDataRequest(mdReqID, subType, marketDepth);
            message.AddGroup(marketDataEntryGroup);
            message.AddGroup(symbolGroup);

 


@rmssf

rmssf
11 Sep 2016, 19:56

RE:

Ok you must be requesting market depth then.

But I'm not seeing field 272 in the server response in my case.

Have you already tried market spot instead of depth and is it working?

rmssf said:

You should have received MarketDataSnapshotFullRefresh (W) and not MarketDataIncrementalRefresh (X).

What subscription type have you used? It must be SNAPSHOT_PLUS_UPDATES (1).

Rui

 

 


@rmssf

rmssf
11 Sep 2016, 19:16

You should have received MarketDataSnapshotFullRefresh (W) and not MarketDataIncrementalRefresh (X).

What subscription type have you used? It must be SNAPSHOT_PLUS_UPDATES (1).

Rui

 


@rmssf

rmssf
09 Sep 2016, 22:09

Named pipes.

Maybe a callback also. Maybe.

 


@rmssf

rmssf
09 Sep 2016, 17:16

RE: RE: RE:

You need a FIX library, and that site implements one with source code and working examples.

 

tetra said:

I am looking for an example like this: https://github.com/spotware/connect-csharp-samples

I don't think external library is necessary, but if you have an example with that, could you copy paste a kick-start snippet? Login and subscribe quote/depth?

Thanks,

 

rmssf said:

tetra said:

Is there a simple FIX example is available somewhere in C#?

Hi,

Yes, there is: http://quickfixn.org

Rui

 

 


@rmssf

rmssf
09 Sep 2016, 16:44

RE:

tetra said:

Is there a simple FIX example is available somewhere in C#?

Hi,

Yes, there is: http://quickfixn.org

Rui


@rmssf

rmssf
09 Sep 2016, 14:59

RE:

Paul_Hayes said:

I have a customer request to duplicate manually opened orders. I have also noticed that the first time the OnPositionOpened method is called the position object does not contain the SL or TP values of the opened order, all subsequent calls work correctly and they have the correct SL and TP values.

I set a timer for 5 seconds and it did not correct the problem. So I would say there is an issue with the API

The API is missing an additional event type -  OnPositionModified()

It would solve this problem and would be much more efficient to catch subsequent modifications than using a timer instead.

Rui


@rmssf

rmssf
09 Sep 2016, 12:55 ( Updated at: 21 Dec 2023, 09:20 )

It looks more like a design problem than a bug.

There are 2 events, the order is opened without SL/TP set, then the platform modifies that position with the chosen SL/TP.

The  OnPositionOpened() is called after the position is opened and before the position is modified.

 

 

Position Opened


@rmssf

rmssf
09 Sep 2016, 10:44

Indeed this is critical, I've never noticed before and I'm surprised with this kind of bug.

It looks like the API sets the TP/SL values only after Positions.Opened() returns.

Rui


@rmssf

rmssf
07 Sep 2016, 12:46

Technically, it's doable.

And without violating any site's terms of use, Fxstreet has an API - http://api.fxstreet.com that is the source of their own calendar and of myfxbook.

I believe it's not a free service though, and because of what I said above, I've never bothered.

But convince me that it can be profitable in any way and more efficient and faster than an algorithm based on price action, and I'll just gladly code everything for you and for free. :)

Rui

 


@rmssf

rmssf
07 Sep 2016, 05:05

Well I guess it depends on whether the broker is connected to an ECN or to an aggregator.

 


@rmssf

rmssf
07 Sep 2016, 03:13

This is how I see things happening at the time of news releases:

During the 1st second after the release, you see an immediate first reaction (can be strong, weak, or none) caused by simple algorithms reacting to the same numbers that you are talking about.

After the 1st second, the market starts to react to other factors, like strong support/resistance levels from long term traders, press releases and additional data or observations that usually accompanies the same release which are not shown in those sites that you refer, that need to be read and interpreted by a human (and they do it very fast). Any of these factors can make the market start to move again further in the same direction or make it retract to the opposite direction.

That's why in my opinion the data published from economic releases in such sites are useless for short time algorithmic trading.

One more thing: getting the data from such sites is not reliable. They are randomly delayed and sometimes they can even show wrong data (Few weaks ago fxstreet published a negative number when it was positive, like -52 instead of 52).

Rui

 


@rmssf

rmssf
07 Sep 2016, 01:49

RE:

Stokes Bay Trading said:

No, it's not. I appreciate the speed the market moves on the release. All I need to do is place a trade on me receiving the release. This may be 1-2 seconds post the fastest algo out there but I am not looking to profit from the first couple of seconds but from the next 30 minutes. Clearly the earlier I get in the better but I still perceive opportunity post a few seconds.

 

Then just putting a stop order may save you the time.

Rui

 


@rmssf

rmssf
06 Sep 2016, 23:44

RE:

Hi,

My advise: just forget it.

If your plan is to place a trade immediately before the market starts to move, by the time you get the data that you need to make a decision, the opportunity is already gone.

Rui

 

Stokes Bay Trading said:

Is it possible to create an algo which reads a webpage (http://www.investing.com/economic-calendar/) and extracts a data release (e,g, non-farm payroll) and places a trade based on a logic formula preset into the algo.

The issues are:

1. fetching/reading the data the instant it is released - somehow reading the webpage continuously to do this. Of course this would only need to be done for seconds around the release time

2. having a template to accomodate logic which could be used for each release. Basically I would mentally calculate and enter a pip value for a range of possible values before the data release and the algo would enter a buy/sell limit or market order based on where price traded immediately prior to the release, the data number and my pip value entered pre-release.

Investing.com and other calendars are quick enough to do what I want. I do not need a Bloomberg, even if i could afford it.

I do not want to use a database of any kind due to speed. Since the release is just one number (potentially 2 on some releases) I would think the data does not need to use a database?

I am a forex trader and in no way a coder. Your thoughts would be very welcome.

 


@rmssf

rmssf
02 Sep 2016, 19:16

It happened with me before with the exact same symptoms described above, it turned out my local firewall was the cause of the issue, so that can also be a problem with the internet connection.

Rui

 


@rmssf