API Support Forum
User Profile

Viewing User Profile for: eo707


About

Nov 08, 2011 03:04 PM

Jan 31, 2016 04:55 AM

Nov 03, 2016 12:24 PM



Post Statistics
eo707 has contributed to 68 posts out of 5677 total posts (1.20%) in 4797 days (0.00 posts per day).

20 most recent posts:

API Support » System.ComponentModel.Win32Exception Error creating window handle. Jan 31, 2016 @ 04:55 AM (Total replies: 0)

On this simple line, I get an exception.
var oec = new OECClient();
It is where I do initialize your component for use.
As long as I remember, I must do this initialization even if I don't use the variable oec.
As my code below not always using oec.OBJECTPROPERTY/METHOD
Only use: OECClient.Global.OnLoginComplete += OnLoginComplete;
For example.

Again I don't see an option to upload a file to your forum... please allow that.
So, I do upload to my server for you to see.
This is an image of the error Detail by Quick View of VS.
http://emeraldone.com/oec/Jan16ErrorNew.jpg

And for the text that is overlapping the viewer...
The StackTrace has more text, I wanted to copy it for you but lost it.
If it is important and it will happen again, then I may copy it for you.
The error don't repeat each time I set to a new instance.


I need to note, it don't happen when I first run the application, then it set a new instance

I set the application running, then I disconnect and don't do anything else.
Then same running application, should set again a new instance, technically it is because I wish to clear all trades of yesterday. and I want new count of everything, so I set new instance...
But, it is not going smooth.
If I close the application, and reopen it, all is well.

I have the same bug on the server, but the error get simulated on my developing environment.

I noticed that my app tried to set new instance not when it needs to trade, so I changed it..but I don't believe it kill the bug.

I let on a timer, to run each 5 seconds, and reset new instance with my attempt to repeat the error not by chance, and it goes well.

so, WTH????

Could you think of something?

Else, my strategy is going well.

I am working now on a demo, you told me that it is ended by Feb 5...
Could I get it longer?
User Name:NLeviav336

Thanks.

API Support » 169825941 and 169825943, are stop orders that did not triggered. Jan 25, 2016 @ 10:32 AM (Total replies: 1)

Sorry, the numbers did not came out right.
169827241 AND 169827243.

API Support » 169825941 and 169825943, are stop orders that did not triggered. Jan 25, 2016 @ 10:24 AM (Total replies: 1)

I had two stop orders, both on price 1012 on Russell.
Price passed 1012, but the stop did not triggered.
What there is today on the Demo Servers?? for few days it worked fine.

API Support » API002743 has 84 contracts and can't exit. Jan 19, 2016 @ 03:58 PM (Total replies: 2)

Chris,
I highly appreciate your support.
I have expressed at least twice that I CANNOT change the balance on the portal..
I get this:
Unauthorized
You are not authorized to view the requested page.

But, it is semantic, and no worry about it.

It just messed with my numbers, and again it is irrelevant since it is only the beginning.
I will be more consistent and see later how...

All good now..
Thanks.

API Support » Position P&L is not the same in the trader software and the data received. Jan 19, 2016 @ 03:54 PM (Total replies: 2)

I understood that you had some issues with the API also sending me wrong position information, as I saw the same numbers in the Developer Software version...

That was last week, now it seems to work in sync and good.

I work against Demo account, AND API acount... they are fine.

you can consider this solved.

API Support » Re-subscribe After Disconnect. Jan 19, 2016 @ 03:50 PM (Total replies: 3)

My apology..
This is not consistent.
Now I just tried, and I click (my app) connect, then I get it as connected, and since on login, I request contract, and then on contract, I request subscription automatically...
So, only connect will do the subscription as well.

Then I click Disconnect, and I got Disconnected, and Unsubscribed....Then, only Connect will reutrn back the subscription and OnPriceChange where I trigger my logic..

Seems to be all good..
Sorry..
Maybe before before Market Time, it behave different.

API Support » C# double vs decimal. IMPORTANT!!! Jan 19, 2016 @ 03:43 PM (Total replies: 2)

Is there any way to close the post?
My mark for a post that got an answer and is irrelevant is the fact that I am listed as the last one who wrote to it.
It is also an indication that the post did not get last reply..

The best solution is to allow us to mark a post as closed, or solved, etc....in order to disregard it.

If you do have this feature, please let me know.

Thank you in addition to allow me to test my application with my friend's demo.
running nice.

Thanks.

Feedback » Search on this forum. Jan 19, 2016 @ 12:39 PM (Total replies: 1)

Hello,
If you would have a system that allow other users to vote for a Question, I was to be curious on if this suggestion will get high rank...
Like in: stackOverFlow.com....The best forum is there.

You have the search on this forum, and when I search usually there are no results.
I don't know how is the search terms affect the results, it is not my point.
When I come back to the form, I am loosing the search term.
And mostly it is not existed for the last 30 days.
The point is that if you have a subject in the forum, it is not a Actual events like news...it is relevant for many months ahead.

My Quest:
1. Keep the search term on the form, when we come back for the results, and even for the next and next pages..
2. Make the default time "-", as all...and only for those that wish to narrow the search, make it to 30...
Or, even best...remember the last chosen item, and save it on cookies per user.

Thank you..
It is an easy fix, and hope to see it soon.

Isaac

API Support » Re-subscribe After Disconnect. Jan 19, 2016 @ 06:54 AM (Total replies: 3)

Hey,
I do connect, then on LoginComplete, ask for:OECClient.Global.RequestContracts(baseContract).
Then on: OnContractsChanged i call Subscribe(Contract)...
All of it go automatically.
Then I am connected, and prices streaming in.


The Error Starts on:
I call Disconnect();

When I attempt to repeat the above process, it won't subscribe.
Only when I restart the program, I get it like before.

Do I miss anything, or you have a bug?

Thanks

API Support » C# double vs decimal. IMPORTANT!!! Jan 15, 2016 @ 09:24 AM (Total replies: 2)

Hello,
I would like to raise a subject that I think you should add to the FAQ page of yours.
What is best to use, decimal of double.
I saw in your components and library that you use double, for price..
I read on documentation that if you use it for calculations/money/market, then you should decimal....
Please make your suggestion..

In other hand, if I take your double, and set it to a variable of mine as decimal then I need to cast...

I wish that you will answer what is the best for C#.

This say, decimal:
http://stackoverflow.com/questions/1165761/decimal-vs-double-which-one-should-i-use-and-when

That too suggest decimal for money/finance/market:
http://stackoverflow.com/questions/803225/when-should-i-use-double-instead-of-decimal

I wouldn't care to convert the entire application to one of each.
Note: when you set:
var p = 0.0;
You get a double, unless you cast.
C# can't do calculation with double vs decimal...use one type and calculate.

Please answer for all of C# developers..
Am looking forward to your deep suggestion..

Thank you for your API.
Developer.

API Support » API002743 has 84 contracts and can't exit. Jan 15, 2016 @ 02:27 AM (Total replies: 2)

I cannot exit the position that I didn't get into..
I had one by the end of the day, then when I tried to close it I got two, then 4, then 8....
Each time I tried to close, I got more...but the original order did not closed..
Now the account is in Negative balance of -$149K...

Thanks,

API Support » Position P&L is not the same in the trader software and the data received. Jan 14, 2016 @ 01:40 PM (Total replies: 2)

I take position from AvgPositions.OTE.
When I restart and re-login, then I get the numbers right.
Then, I keep the app open, and get second, and third trades, then the position somehow don't get Re-Set or Re-Synch with the position I see in the Trader Developer.

In addition, I don't see the total balance the same in my api and the trader software (developer).

Thank you.

API Support » Why OECClient.Global.Contracts.Values is empty? Jan 14, 2016 @ 01:35 PM (Total replies: 4)

I think I got it..
The FAQ is amazing to get familiar with the API.

you can close it.

API Support » I noticed that you reduce $5 from position Balance... Jan 14, 2016 @ 05:27 AM (Total replies: 1)

I know that 1 tick of Mini Russell 2000 is $10, then I see profit of $X5, and when I lose I see the right $10 per tick.

Is it the commission?
And, how much you charge round trip as commission as a broker?

API Support » Why OECClient.Global.Contracts.Values is empty? Jan 14, 2016 @ 03:06 AM (Total replies: 4)

UPDATE:
I ran subscribe after a little while and got my Contract.
Usually It didn't do that...
Still I see that as error and wish to request:
Can you tell me how / when I can be sure that Contract is there?
Since I ran Subscribe one time, and now I miss it (sometimes).

Or, What comes in the sequence before Contract comes to place.

Even when I ask, I continue to look, and find.

Thanks,
eo707

API Support » Why OECClient.Global.Contracts.Values is empty? Jan 14, 2016 @ 02:56 AM (Total replies: 4)

Hello,
Just found the Events Link since I asked in this forum, would like to contribute.

List of Events can be subscribed to OEC:
http://futures.gaincapital.com/api/api/?topic=html/Events_T_OEC_API_OECClient.htm

Thank you for your support

API Support » Why OECClient.Global.Contracts.Values is empty? Jan 14, 2016 @ 02:52 AM (Total replies: 4)

OnLoginComplete I did run the request contract.
OECClient.Global.RequestContracts("RLM-M") (for TF)

I looked in the online documentation, to see where I can find all your methods...Call Back Events...
Could you guide me in addition?
Do I have OnSubscribedSuccess (or Status Changed)???
I don't see any reaction to the RequestContracts call, and then I do call OECClient.Global.Subscribe(Contract from list in subject, but it is null because it is empty)
OECClient.Global.Contracts.Values is empty

It used to work, few hours ago.
After I connect, nothing happened, don't get price changed...

Thanks to your help.

API Support » Linked Orders, 203487276 and 203487279, Stop cancelled. Jan 14, 2016 @ 02:14 AM (Total replies: 3)

OK,
Next will pay attention, and debug.
you can close ticket.

API Support » Linked Orders, 203487276 and 203487279, Stop cancelled. Jan 13, 2016 @ 05:09 PM (Total replies: 3)

I sent a sell Stop order with Buy Stop.
The sell got accepted, but the buy did not.
I need them to be connected...
So, I have Sell Stop, and when it is triggered, attach to it a Buy Stop.
I remember Main Stop get Working status, and Linked Stop get a Held status...

Why I cannot upload a file here?
http://emeraldone.com/oec.jpg

AND, How can I know from code that the attached/Linked order got cancelled??
In OnOrderConfirmed, I get both orders...
Both with CurrentState=Sent

I tried to search for another indication for failed order...
or, how can I set when I call the order, that if it failed, don't fill it?
When I call SendLinkedOrders....I add a variable that if the Stop Loss order will not succeed, then don't fill the first...
Bind them absolutely.

API Support » How can I change password for the API access? Jan 13, 2016 @ 02:38 PM (Total replies: 0)

When I logged to the Trader Developer, or with my application...
I wish to have another password than APIXXXX...

I did change in my account:
https://myaccount.gainfutures.com/
But it reflect only for this login, not even to:
http://api.gainfutures.com/

How?