How can request more details about the existing positions?
Atom Ответить
27.11.2017


Hello Mikhail and hi all!

This StockSharp project looks very-very exciting and I started to look through some source codes and I tried some examples.
Unfortunately I cannot find the way, how can I get details about the active (opened) positions?
For example I made a connection to FXCM (by the SampleFxcm project) and I subscribed to the NewPosition event with a new function: Trader_NewPosition(Position pos)
Код

Trader.NewPosition += position => Trader_NewPosition(position);
Trader.NewPosition += position => _portfoliosWindow.PortfolioGrid.Positions.Add(position);
...
        private void Trader_NewPosition(Position pos)
        {
            MessageBox.Show("cval: " + pos.CurrentValue.ToString() + " | desc: " + pos.Description + " | Currency: " + pos.Currency.ToString() + " | RealizedPnL: " + pos.RealizedPnL.ToString() + " | BlockedValue: " + pos.BlockedValue.ToString());
        }

Kind of every values in the Position object are null, so I could not get the entry price and the direction values.
Or this limited data problem is only related to the FXCM connections? ...because in fact I plan to use the CQG and/or the Rithmic connections.
Please help me, how can I get the existing positions details after a new connection?

Thanks in advance!
Jose

Теги:


Спасибо:




26 Ответов
1 2  >
Mikhail Sukhov

Фотография
Автор статей Программист Трейдер
Дата: 28.11.2017
Ответить


Hello Jose,

All support provides by special team. You can get an access. Please read details.

Also we have documentation on English.
Спасибо: Jose

Jose

Фотография
Дата: 29.11.2017
Ответить


Hello Mikhail,

Thank you for your answer!
I checked the documentation and with this help I tried to get more details about my existing positions on different ways, but I always got back empty information - with other platforms I can see my EURUSD position is still there (I opened this position some days ago with the SampleFXCM app). ...but of course it has a chance I did something wrong...

I also tried to connect to FXCM with the Terminal and with the Hydra (based on the log it has happened) but in addition I always got some error messages, for example:
Код

17:34:22 Ecng.Data.BatchException`1[StockSharp.Hydra.Core.HydraTaskSettings]: Batch command thrown a exception. ---> System.ArgumentException: Type 'System.Uri' has no one members.
at Ecng.Serialization.SchemaManager.ValidateSchema(Schema schema)
at Ecng.Serialization.SchemaManager.<>c__DisplayClass16_0.<GetSchema>b__1(Type key)
at Ecng.Collections.CollectionHelper.SafeAdd[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 handler, Boolean& isNew)
...

I could not interpret it. Anyway, just please inform me about these two things:
1.) Does your API support this feature? I mean is it possible at all to request and get the all details about an existing position(s) regardless which connection* what do I use?
2.) Is your API's connections* are stable and tested? (I mainly asked because of the errors what I have faced during the connections from the Terminal)
* = i.e: Rithmic, CQG, LMAX, FXCM, IB
and I promise that if your API works well (because I hope it can handle orders Laugh perfectly) and stable I will purchase a technical support ...furthermore I plan to attend on the training too because despite the initial difficulties your product looks very promising.

+1) Usually how many msec is necessary to execute an order and get a feedback/confirmation about it? I know it depends on the server, connection, location, broker and etc. too, but if you have some experiences, measured information about your API please let me know.

Regards,
Jose
Автор топика
Спасибо:

Mikhail Sukhov

Фотография
Автор статей Программист Трейдер
Дата: 29.11.2017
Ответить


1) Yes
2) Yes
Спасибо: Jose

Jose

Фотография
Дата: 30.11.2017
Ответить


Thank you! Yesterday I bought the extended license. Please inform me about how can I get details about the existing positions Laugh

Regards,
Jose
Автор топика
Спасибо:

Юрий Басангов

Фотография
Курсы Автор статей
Дата: 01.12.2017
Ответить


Jose Go to
Thank you! Yesterday I bought the extended license. Please inform me about how can I get details about the existing positions Laugh

Regards,
Jose


Hello, Jose
I think there is some misunderstanding. Under our special pffer we provide only extended license, which include:
- Ready-to-use market making strategies
- Quoting, option hedging
- Order log (level 3) strategies
- S#.Data server

Other features like videos, samples and support don't include in it.
If you want to get lifetime support you can take part in our crowdfunding project with investing 500 usd. More info here

Спасибо:

Jose

Фотография
Дата: 01.12.2017
Ответить


Hello Yury,

Hmmm, in this case the description is totally unclear! Because there (http://stocksharp.com/news/8878/Cyber-Wednesday!/) you talked about the "Extended license" and I have checked this package's description on the pricing page (http://stocksharp.com/products/pricing/) where the extended license clearly contains the following things:
- Ready-to-use market making strategies
- Quoting, option hedging
- Order log (level 3) strategies
- S#.Data server
- S#.Shell source code
- Extended samples
- 40+ hours video training
- Premium support
...I do not see another "extended license" description anywhere else, so I don't understand your current, decreased license offer Confused ...furthermore unfortunately I can't pay +310 USD more, it is too much for me Confused Please offer me something else!

Regards,
Jose
Автор топика
Спасибо:

Юрий Басангов

Фотография
Курсы Автор статей
Дата: 02.12.2017
Ответить


Jose Go to
Hello Yury,

Hmmm, in this case the description is totally unclear! Because there (http://stocksharp.com/news/8878/Cyber-Wednesday!/) you talked about the "Extended license" and I have checked this package's description on the pricing page (http://stocksharp.com/products/pricing/) where the extended license clearly contains the following things:
- Ready-to-use market making strategies
- Quoting, option hedging
- Order log (level 3) strategies
- S#.Data server
- S#.Shell source code
- Extended samples
- 40+ hours video training
- Premium support
...I do not see another "extended license" description anywhere else, so I don't understand your current, decreased license offer Confused ...furthermore unfortunately I can't pay +310 USD more, it is too much for me Confused Please offer me something else!

Regards,
Jose


Hello, Jose
In our article we write: "No training courses or opened account required". Extended license usually provided only with training course, in this offer we give just license.
I think we can give you 1 month support on our forum. Is this ok for you?
Спасибо:

Jose

Фотография
Дата: 02.12.2017
Ответить


Hello Yury,

"No training courses or opened account required" --> for me "No" means that during this promotion I don't have to buy training courses or open an account through your company. I think we agree on it therefore I don't know why you highlighted this sentence?
But "in this offer we give just license" where was it written? ...or maybe "extended" in the price list (http://stocksharp.com/products/pricing/) and "extended" in the advertisement means different things in your perspective? Furthermore your description what you have written above does not exist in the original advertisement (http://stocksharp.com/news/8878/Cyber-Wednesday!/):
Цитата:
we provide only extended license, which includes:
- Ready-to-use market making strategies
- Quoting, option hedging
- Order log (level 3) strategies
- S#.Data server

These things are very misleading and I don't think that it is my fault.
So 190 USD for a single question? No thanks! I am very disappointed, because firstly I asked one simple question then your colleague said I should buy support license for getting an answer. I was surprised but I thought okay because maybe later I will have more questions. Finally I decided to spend more money than just a "basic support" because of your special discount, so I bought your "extended" offer ...and now you are trying to explain that what I bought is not what is in the price list (http://stocksharp.com/products/pricing/). Sorry, I don't feel that you really try to collaborate with your new customer who originally just wanted to get an answer to his simple question. Please send my money back!

Regards,
Jose
Автор топика
Спасибо:

Mikhail Sukhov

Фотография
Автор статей Программист Трейдер
Дата: 03.12.2017
Ответить


Hello Jose,

First of all please accept my apologies for any unclear information. Sure it is not your fault.

When you start topic on the forum without any active support subscription you should to redirect to http://stocksharp.com/support/warning/ Also i've provided link to support page http://stocksharp.com/support/ as a first answer. Not sure why this info was missed by you but we put more links next time.

Extended license currently do not for sale. It is provide only for edu clients or opened accounts. Both of this has perpetual support (and part time it is a premium mode). There is no any option to get perpetual support except this. We did a promo action and didn't mark that support is excluded for promo clients. We will fix it for the next time.

We can convert your extended license to support subscription (each month has a price $49) and you will have support during the period (not only 1 question, any number of questions during the subscription). Or we can provide full refund back. What is the best for you?
Спасибо:

Jose

Фотография
Дата: 03.12.2017
Ответить


Hello Mikhail,

Thank you! I saw the support subpage and I checked that too when you wrote it, on the next day when I wanted to buy the support package then I saw the Wednesday’s unique offer and I felt myself lucky (because then the advertisement meant for me I can buy the “extended” package what’s included with support as well). Of course now, after our conversations here in the forum I understand clearly, but earlier I didn’t know these details because it was nowhere written. So yes, please be more careful, I mean write more details about promos if you or your colleagues will post next time.
How I mentioned earlier I think your project is promising and I am still curious, furthermore now I feel the collaborating from your side too. Thank you! I really hope I won’t have questions in the next 4 months continuously :) ...so let’s deduct 49 USD from my current balance for the first month support, and I think during this month I will be able to decide how we can collaborate in a long time. Later we can talk about the remaining money refund or maybe I will send more and I will buy an education package or anything else. If it is okay for you then let’s start to work together!

Regards,
Jose
Автор топика
Спасибо:

Mikhail Sukhov

Фотография
Автор статей Программист Трейдер
Дата: 04.12.2017
Ответить


Jose Go to
so let’s deduct 49 USD from my current balance for the first month support, and I think during this month I will be able to decide how we can collaborate in a long time. Later we can talk about the remaining money refund or maybe I will send more and I will buy an education package or anything else. If it is okay for you then let’s start to work together!

Regards,
Jose


Thank you for your understanding.

We've provided full refund back (partial refunds are not allowed). Please check your bank account in next 2-3 business days.
Спасибо: Jose

Jose

Фотография
Дата: 18.12.2017
Ответить


Thank you, the money has arrived back in time.
I took a short holiday and I have returned today so I bought a support package, please help me in my original question.
(ps. somehow I could not pay via PayPal this time as well)
Автор топика
Спасибо:

Jose

Фотография
Дата: 19.12.2017
Ответить


Hi,
maybe I am tired the end of my day because in this moment I cannot find that button in the forum, where I can create another topic. So please forgive me but I will write another question here:
I didn't take any modification yet in "Rithmic sample application" and I would like to connect with it but I don't know what certificate file should I use!? I just have a username and password for my account and nowadays I use it with Ninjatrader well. I have found a certificate (*.pk12) file in NT's folder but then I got a "bad input" error message which is understandable :)
I should ask this certificate file from my futures broker or what file do I have to use there?
Автор топика
Спасибо:

Support

Фотография
Дата: 19.12.2017
Ответить


Hello

Could you please output Position.ToString to some file and please send it to the thread.

To create a new topic you need to press big green button on the main page.
Спасибо:

Jose

Фотография
Дата: 19.12.2017
Ответить


Support Go to
Could you please output Position.ToString to some file and please send it to the thread.


Yes!
Код

        private void Trader_NewPosition(Position pos)
        {
            System.IO.File.WriteAllText(@"t:\TEMP\fxcm-pos.txt", pos.ToString());
....


Text file content:
931651-EUR/USD@FXCM

I also checked with breakpoint in VS too and the "931651" is nothing more then just the Portfolio's name property value, so unfortunately the most objects seems almost totally empty too, except Security object.

Цитата:
To create a new topic you need to press big green button on the main page.

Indeed :))))) Yesterday I was too tired :) and surprised because this form input and the topic input fields were filled by my older post texts and I didn't want to edit that (furthermore the url contained "edit" too, not for example "new") - but of course it was my browser or some cookie who made this joke with me :)
Автор топика
Спасибо:

Support

Фотография
Дата: 20.12.2017
Ответить


FXCM connector fill Position.CurrentValue. Please check it. If the value is zero your position is closed.

Position object like other structures contains shared properties. It mean some of connection fill only subset of the properties. For example Position.Commission fills by small set connectors only.
Спасибо:

Jose

Фотография
Дата: 20.12.2017
Ответить



I made a screenshot, so Position.CurrentValue is null as well (otherwise the text file should had to contain).
The position is not closed it is 100%! For example I think Trader_NewPosition would never be triggered if I don't have any opened position, so the position is exists it is for sure (another platform what I use too that displays the exists EURUSD position with all details under this same FXCM account).
Furthermore the Position object is not totally empty, so it has some values how I wrote above ("31651-EUR/USD@FXCM"), therefore this connector knows about the opened position just don't know any other details about that.
The Portfolios content can be another proof about that the position still exists:


In this moment I have opened a new position via StockSharp. ...but the result is the same:

The new Portfolios content:


So how can I get these exists positions details, for example direction, entry time and entry price, etc. parameters?

ps.: when I open a new position then the situation is the same with the Trader_NewOrder(Order obj) event, there the Order object didn't contain the details (for example entry price and etc.) about the new order

Автор топика
Спасибо:

Support

Фотография
Дата: 21.12.2017
Ответить


Please use PositionChanged event and track changes until receive required values. SampleFXCM shows positions with filled current values. It mean all necessary data are received by connector.

NewPosition event triggers when created new object of Position class. It can be happen for first time connection or made some trades. NewPosition event DO not mean a position was opened.
Спасибо:

Jose

Фотография
Дата: 04.01.2018
Ответить


Happy New Year!

I tried with the recommended PositionChanged event. It has been well triggered after the connection got established but this event still does not give back the necessary details about the existing positions Crying
See below the Position's object values:

The "Commission" and "CurrentValue" values are valid, but where/how can I get/request the direction of this existing position, the entry time, the entry price and etc.?
Автор топика
Спасибо:

Support

Фотография
Дата: 06.01.2018
Ответить


Jose Go to

The "Commission" and "CurrentValue" values are valid, but where/how can I get/request the direction of this existing position, the entry time, the entry price and etc.?


Direction points by sign. Negative current value means short. Positive - long.

We fill most of all values translated by FXCM.
Спасибо:

Jose

Фотография
Дата: 06.01.2018
Ответить


Цитата:
We fill most of all values translated by FXCM.

I don't understand it, how do you mean?
Please send me a code part about how can I request the position's entry time and the entry price about the existing position(s)
Автор топика
Спасибо:

Support

Фотография
Дата: 08.01.2018
Ответить


Position object do not have such property. You can track entry time by executions. For example use MyTrade object.

We cannot fill our object with non exist info. Unfortunately FXCM do not provide entry info.
Спасибо:

Jose

Фотография
Дата: 15.01.2018
Ответить


Цитата:
Unfortunately FXCM do not provide entry info.


Please take a look to my original question what I wrote in November:
Цитата:
Does your API support this feature? I mean is it possible at all to request and get the all details about an existing position(s) regardless which connection* what do I use?
* = i.e: Rithmic, CQG, LMAX, FXCM, IB


To this question above Mikhail answered: yes
...this was the main reason why I paid for your support service.
But now your last answer makes me very surprised and I am mostly dissatisfied.
Thank you for stole my time and my money.

Автор топика
Спасибо:

Support

Фотография
Дата: 16.01.2018
Ответить


Thank you for your feedback. You paid for support service and we provide it. Unfortunately we cannot provide info that doesn’t exist. If you broker do not translate required data S# will fill by blank values. That is why we recommend to use workaround with your connection. Or try to use different broker with required data.

Спасибо:

Jose

Фотография
Дата: 16.01.2018
Ответить


Yes, it would be nice if I could get a correct support service but please read my original question thoughtfully and your answer to it.

- my question: "...regardless which connection* what do I use? * = i.e: Rithmic, CQG, LMAX, FXCM, IB"
- first answer: "yes"
- answer now: "try to use different broker with required data"

So this is the reason why I still feel that: your paid support service is a scam.

ps.: some other companies' connectors to FXCM totally supports these necessary functions, so I really cannot imagine that FXCM does not provide indispensable information
Автор топика
Спасибо:
1 2  >

Добавить файлы через драг-н-дроп, , или вставить из буфера обмена.

loading
clippy