|
|
 |
|

04-08-2009, 04:52 PM
|
|
Member
|
|
Join Date: Oct 2008
Posts: 474
|
|
|
Developers reported that the code causing the problem is found. I'll try to schedule this critical update as soon as possible. Since it is not "new feature" and the problem potentially affects a lot of users, it must be possible. Thank you again for your help in finding of this problem!
|

04-09-2009, 12:54 PM
|
 |
Member
|
|
Join Date: Nov 2006
Posts: 30
|
|
|
Thank you for looking in to this. I am looking forward to the fix. Keep me posted.
phil
|

04-29-2009, 12:07 PM
|
 |
Member
|
|
Join Date: Aug 2006
Posts: 112
|
|
|
This appears to be fixed in the latest version, v01.04.041509. I use to get the error at least 25% of the time and after installing that version of the API and rebuilding I have not been able to get the error.
__________________
Jacob Anawalt
Gecko Software, Inc.
|

04-29-2009, 06:23 PM
|
|
Member
|
|
Join Date: Oct 2008
Posts: 474
|
|
|
Thank you!
|

05-06-2009, 11:06 AM
|
|
Member
|
|
Join Date: Apr 2009
Posts: 7
|
|
|
COND_DIST system property
I, too, was getting "Price did not pass validation", so I looked it up and found this thread. I assume that my OpenTrade price was not within COND_DIST from the rate quote, so I want to check my user's price before calling the OpenTrade API.
The problem is, the documentation that came with my distribution does NOT list this as a valid system property, and when I tried using the string "COND_DIST" I got an exception with "Unknown name".
What am I missing here? I am trying to call the GetSystemProperty method against the trade desk object with "COND_DIST". I assume it returns a 'double' as that is how the rate quote is returned.
Thanks,
Mitch
|

05-06-2009, 12:25 PM
|
|
Member
|
|
Join Date: Oct 2008
Posts: 474
|
|
|
COND_DIST is the minimal allowed distance between conditional (i.e. stop and limit) order and the current market price (or the entry order price). It does not affect the market rate checking.
For the market order, it is a good style, to either use "open at any market price" (i.e. 0 instead of price for the Open/CloseTrade) or to get the most fresh quote from the offer table. The rules of checking the price are based on the lot of internal things and can't be checked correctly on the client site, but the approach above guarantees that the operation will be executed in most cases.
The server may provide no property in case the limitation is not applicable.
Almost all properties returns the String value. The set of properties depends on the server only, so O2GO can not convert all of them to the right type automatically.
|

05-06-2009, 01:35 PM
|
|
Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
|
Properties
Nikolay,
Thanks for the clarification. I also updated my API version
today... that should help(!).
Mitch
|

05-12-2009, 01:24 PM
|
|
Member
|
|
Join Date: Apr 2009
Posts: 6
|
|
|
COND_DIST property question
I recently updated my API to version 04152009.
I was trying to use public method TradeDeskAut.GetSystemProperty
to get the COND_DIST (in C#), but when I used "COND_DIST", I got
System.InvalidCastException was unhandled
Message="Specified cast is not valid."
My code looks like this:
Code:
double cond_dist = (double)oTrDesk.GetSystemProperty("COND_DIST");
Since it says "The data type depends on the type of the property" and since it is expressed in pips, I assumed it would return a double.
I also looked in the examples, but could not find anywhere that GetSystemProperty was used in them (I used windows search).
|

05-12-2009, 02:22 PM
|
|
Member
|
|
Join Date: Oct 2008
Posts: 474
|
|
|
GetSystemProperty("COND_DIST") returns string.
Try to use Double.Parse((string)GetSystemProperty("COND_DIST" ), CultureInfo.InvariantCulture)
In order to avoid the problem in the various locales and in case the datatype will be changed the better way is to check the datatype, i.e. do something like this:
object x = GetSystemProperty("COND_DIST");
if (x is int)
cd = (int)x;
else if (x is double)
cd = (double)x;
else
cd = Double.Parse((string)x, CultureInfo.InvariantCulture)
Last edited by Nikolay.Gekht; 05-12-2009 at 02:26 PM..
|

05-14-2009, 10:38 PM
|
|
Registered User
|
|
Join Date: Feb 2009
Posts: 3
|
|
|
My program places the exact same buy and short order when the condition is hit. I specify the same entry amount and stop and limit. It will work fine for several orders and then I'll get a "stop price did not pass validation" which will stop the whole program. How come the exact same order works 5 times in a row and then doesn't? Here is the code.
oTradeDesk1.CreateEntryOrder AcctID, "EUR/USD", True, 1000, EurUsdBuyRate, EurUsdBuyRate - EurUsdFirstStopAmount, EurUsdBuyRate + EurUsdFirstLimitAmount, 0, TrackEurUsdFirstBuy, DealerInt
I think it has something to do with the bid and ask. How do I get it to at least place it at the minimal distance? I just think this is rediculous that it works 5 or 10 times and then it won't work and you have no idea when it's going to happen. I tried to figure out what the distance would be, but it seems to just be stuck at 5, but obviously that changes. I used this code and it always returns 5. Thanks for any help.
Private Sub EntryDistance_Change()
EntryDistance.Text = oTradeDesk1.GetSystemProperty("COND_DIST_ENTRY")
End Sub
|

10-05-2009, 06:17 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 10
|
|
|
CreateFixOrder FIX_OPENMARKET "Price did not pass validation"
I keep getting "Price did not pass validation" error when using
oTradeDesk.CreateFixOrder oTradeDesk.FIX_OPENMARKET, 0, 0, 0, 0, strAccount, strinstrument, strBuySell, nLots, 0, 0, 0
I have been using the same code for a very long time but am only recently getting this error.
When I look at the parameters they all look correct.
Please let me know what is causing this error.
|

10-05-2009, 11:08 AM
|
|
Member
|
|
Join Date: Oct 2008
Posts: 474
|
|
|
This is the server-side error message, so:
1) Could you please provide the whole error message, this message is usually followed by the error details like prices.
2) Could you please provide the connection name (is usually visible in the Trading Station's status bar, in 5th indicator, something like Demo:U100D).
|

10-06-2009, 03:37 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 10
|
|
|
Error Message Details and Connection Name
1) Please find one example as below:
Run-time error '-2147467259 (80004005)'
Price did not pass validation: A:387872 OF:11 SB:B Q:100000 AM:0 OR: 142.044 2-1176117 CR:142.04401 2-1176117 PR:142.036 2-1176117
I have many other examples which are captured as screenshots. I can send or attach these if you let me know how.
2) The connection name in the status bar is:
dDemo:GBDEMO
|

10-06-2009, 03:40 AM
|
|
Member
|
|
Join Date: Jun 2009
Posts: 10
|
|
|
Adding Error Screenshots
OK...think I have found where to add attachments.
Adding screenshots of some of the instances of this error.
Please see the following attachments
20091002-001.bmp
20091002-002.bmp
20091002-003.bmp
20091002-004.bmp
|

10-06-2009, 02:13 PM
|
|
Member
|
|
Join Date: Oct 2008
Posts: 474
|
|
|
Thank you for the information. I'll research the cause and will notify about the results immediately.
|
 |
|
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|