This function modifies order price.
Signature
function modifyOrderPrice(account, orderId, price)
Example
orderId = placeOrder(AT_ACCOUNT,
AT_EXCHANGE, AT_SYMBOL, "BUY",
"LIMIT", AT_PRODUCT_TYPE, 10,
100.5, defaultTriggerPrice(), True);
// You can save this orderId in a static variable
saveStaticVariableText(AT_ACCOUNT, "ORDER_ID", orderId);
// Somewhere later in your code,
// when you want to modify this order
// Read orderId from static variable
orderId = readStaticVariableText(AT_ACCOUNT, "ORDER_ID");
// Modify the order
modifyOrderPrice(AT_ACCOUNT, orderId, 101.6);
Signature
Public Function ModifyOrderPrice(PseudoAccount As String, _
OrderId As String, _
Price As Double) As Boolean
Example
orderId = PlaceOrder("ACC_NAME",
"NSE", "SBIN", "BUY",
"LIMIT", "INTRADAY", 10,
100.5, 0, True);
' Somewhere later in your code,
' when you want to modify this order
' Modify the order
Call ModifyOrderPrice("ACC_NAME", orderId, 101.6)
Signature
bool modifyOrderPrice(string account,
string orderId, double price)
Example
string orderId = placeOrder(AT_ACCOUNT,
AT_EXCHANGE, AT_SYMBOL, BUY,
LIMIT, INTRADAY, 10,
100.5, defaultTriggerPrice(), true);
// You can save this orderId in a static variable
// Somewhere later in your code,
// when you want to modify this order
// Modify the order
modifyOrderPrice(AT_ACCOUNT, orderId, 101.6);
In this example, we are changing price form 100.5/- to 101.6/-.
Parameters
- account – pseudo account
- orderId – publisherId (orderId given by placeOrder*() function)
- price – order price (pass zero if you don’t want to change)
Return value
This function sends request to modify order price to AutoTrader Desktop Client. On successful submission, it will return True, otherwise False
The type of the return value is Boolean.