Jump to content
SupereeDuperee

Reason Code 15 - Trigger level calculation type does not exist

Recommended Posts

From my own/personal windows .net app I am sending Limit Order(s) and getting errors :-


2021-05-16 19:02:34:136 : Order Placed for EUR/JPY Buy Amount=1000, Rate=132.749737794 Status=4 Reason=15
2021-05-16 19:02:34:136 : Order FAILED FOR EUR/JPY : InstructionStatus=4=Error InstructionReason=15=Trigger level calculation type does not exist.

At that 07:02nd Minute's OHLC for EUR/JPY = 132.934/.945/.927/927. My app was sending a BUY-LIMIT order @132.749xxx. So the price should not be a problem.

Can some one please shed some light why the order failed? AND what that Error Message means? Thank you.

*** What kind of encoding causing those weird "Â" to appear? (Just curious, not an issue)

 

Share this post


Link to post

Hi Superee,

What is the OrderStatusReason code you receive in the response? That might help shed light on the matter.

Please cut and paste the JSON order request you sent together with the full response you received and we can look it over to check for problems on that end too. Not sure what is causing those weird formatting errors - not seen them before. 

KInd Regards, PM

Share this post


Link to post

The API URL = https://ciapi.cityindex.com/TradingAPI/order/newstoplimitorder

RequestJSON

{"OrderId":0,"MarketId":401484338,"Currency":null,"AutoRollover":false,"Direction":"Buy","PositionMethodId":1,"Quantity":1000.0,"BidPrice":132.914,"OfferPrice":132.93,"AuditId":"4910693","TradingAccountId":XXYYZZ,"IfDone":{"Stop":{"Guaranteed":false,"TriggerPrice":132.629737794,"ExpiryDateTimeUTC":null,"Applicability":"GTC","ParentOrderId":null,"TrailingDistance":null,"Associated":false,"OrderId":0,"Reference":null,"OrderReference":null,"AutoRollover":false,"MarketId":401484338,"Direction":"Sell","Quantity":1000.0,"OriginalQuantity":0.0,"Price":null,"OriginalPrice":null,"TradingAccountId":401305136,"CurrencyId":0,"StatusId":0,"TypeId":0,"IfDone":null,"OcoOrder":null,"LastChangedDateTimeUTC":null,"AssociatedOrders":null},"Limit":null},"OcoOrder":null,"Applicability":null,"ExpiryDateTimeUTC":null,"Guaranteed":false,"TriggerPrice":132.749737794,"Reference":null,"AllocationProfileId":0,"OrderReference":null,"Source":null}

 

ResponseJSON


{"Status":4,"StatusReason":15,"OrderId":0,"Orders":[],"Quote":null,"Actions":[],"ErrorMessage":null}

 

Share this post


Link to post

NEVERMIND on the weird "Â". I have an ENUM class to convert Error Code to Explanation, I copied the texts from the web page and probably picked up different encoding from there. I forgot that JSON Response doesn't provide any error explanations.

Share this post


Link to post

Hi Superee,

To confirm, based on the sample code you are placing an entry order to open a position should the market hit your specified price. 

If/when this happens you then want a stop loss and take profit limit attached to the newly opened position.

I've forgotten, are you a US Forex.com client perchance? US regulations prohibit US clients from placing attached stop loss/take profit limit orders to entry orders. I think this might be the issue here. 

Kind Regards, PM

image.png

 

Share this post


Link to post

Yes, I am a US Forex.com user. I believe the DEMO Account does not MIMIC the US Forex.Com rules and thus my TESTing passed in DEMO trading but failing in PROD/Real-Life. At least ,now I know what's causing the problem. Thanks.

I think I have to send a "newstoplimitorder' without any STOP/LIMIT children. Once the order gets fulfilled I can then attach  stop/limit order. I have to MONITOR periodically if the ORDER is fulfilled or not. RIGHT?

For a US Forex Trader , like me, is it  possible:-

1. Send a market BUY order for 10000 Units of USD/CAD rate = 1.0050,  with stop=1.0000, limit 1.0090
2. Send  10000 Units of USD/CAD NewStopLimitOrder BUY for 1.0040
3. At some point, NewStopLimitOrder for 1.0040 BUY executed. Can I attach Stop=1.0010 and Limit=1.0070 for this TRADE (this stop limit is different than EXISTING trade's Stop/Linit rates)?

Share this post


Link to post

Hello Superee,

Appreciate the note about the demo account. :)

Yes, US clients under NFA regulations have to send in entry orders without any stop/limit orders attached. If or when the entry order is triggered/filled and becomes a new open position, at that time you can then add stop/limit orders to the open position.

You may wish to use our mobile trading App to monitor your entry orders. You can elect to receive push notification on the cellphone when an order is triggered/filled. 

1) Yes, you can do that. Placing an order to trade at market can be sent with stops/limits.

2) Yes, sending a valid entry order without stops/limits will work.

3) For US / NFA regulated clients, stops / limits are not "attached" to individual trades when you have placed multiple trades in the same market. Stops / limits are "associated" with your net position in that market. So in your example you have placed 2 separate trades in USD/CAD. Your stops/limits are not attached to trade 1 or trade 2 that you used but to your net position in USD/CAD. 

Kind Regards, PM

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×