Hello - I have few questions related to strategy positions(all questions are inter-related and would help to determine the next course of action for me). Appreciate if someone can give some input on this:
Question 1:
- Is it possible to give a variable name to order name rather than hard-coded string? This would give more flexibility for what I am trying to do.
for example: usual way of coding:
buy ("LE") 1 contract next bar market;
is there any option to change this to
Var: OrderName("LE");
buy (OrderName) 1 contract next bar market;
Question 2:
- Is it possible to determine the queued up orders/limit price(no fill yet - just queued up) for a chart through any of the keywords? Would like to check on the open order name / price so that a separate section can be coded to determine the next set of actions.
Question 3:
- is there any efficient way to find out if the limit price is hit but not filled ( in backtesting - as soon as the price hits - there is a fill but in real world - there is a possibility of not getting filled and would like to handle this condition ). Trying to determine the way to handle this. For single order entry - it's easier to check for the price movement and cancel the order if there is no fill. But for single strategy multiple orders ( few orders could be at the same price ) it would become difficult to determine and handle the no-fill/cancel without the "queued" up ordername/price and answer from question 2 should help in a great deal.
Thanks in advance!!
neeed help - strategy position related
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: neeed help - strategy position related
Hello Vking.
1) Order name is a static information, it cannot be changed with script recalculation. That means Q1 is not possible.
2) Unfortunately that is also not possible. If the order price is changed-order will be modified or replaced. THe order price is user specified in the script
3) Order prices are specified in the script. During the price order generation you can store the prices in an array for example and do the same for the names of the price orders.
1) Order name is a static information, it cannot be changed with script recalculation. That means Q1 is not possible.
2) Unfortunately that is also not possible. If the order price is changed-order will be modified or replaced. THe order price is user specified in the script
3) Order prices are specified in the script. During the price order generation you can store the prices in an array for example and do the same for the names of the price orders.
Re: neeed help - strategy position related
thanks Henry.
For Question 2:
- Is it possible to determine the queued up orders/limit price(no fill yet - just queued up) for a chart through any of the keywords? Would like to check on the open order name / price so that a separate section can be coded to determine the next set of actions.
- How does MC translates the pending order to filled order and map it? Is it possible to get access to that information?
- based on some other thread below:
you were going to provide access to certain information from Accounts tab.
viewtopic.php?f=1&t=8971
Is this something that can be extracted from accounts tab and provide access to power language in terms of "pending/queued" up order names/type and price?
Thanks.
For Question 2:
- Is it possible to determine the queued up orders/limit price(no fill yet - just queued up) for a chart through any of the keywords? Would like to check on the open order name / price so that a separate section can be coded to determine the next set of actions.
- How does MC translates the pending order to filled order and map it? Is it possible to get access to that information?
- based on some other thread below:
you were going to provide access to certain information from Accounts tab.
viewtopic.php?f=1&t=8971
Is this something that can be extracted from accounts tab and provide access to power language in terms of "pending/queued" up order names/type and price?
Thanks.
- Henry MultiСharts
- Posts: 9165
- Joined: 25 Aug 2011
- Has thanked: 1264 times
- Been thanked: 2957 times
Re: neeed help - strategy position related
Q2) Unfortunately that is not possible.
The order is transmitted to the broker, MC receives status updates from the broker.
That is not possible to access that information from the PowerLanguage at the moment.
Information from Accounts tab cannot provide access to power language in terms of "pending/queued" up order names/type and price.
To achieve your goal you need to wait for the implementation of your feature request.
The order is transmitted to the broker, MC receives status updates from the broker.
That is not possible to access that information from the PowerLanguage at the moment.
Information from Accounts tab cannot provide access to power language in terms of "pending/queued" up order names/type and price.
To achieve your goal you need to wait for the implementation of your feature request.
-
- Posts: 30
- Joined: 17 Jul 2009
- Has thanked: 5 times
- Been thanked: 10 times
Re: neeed help - strategy position related
Hello vking,
I posted a request in Project Management about the same issue as your Question 1:
- Is it possible to give a variable name to order name rather than hard-coded string? This would give more flexibility for what I am trying to do.
The request number is MC-1179.
Could you please vote for it, and have other friends concerned by this issue
vote also for it?
Thanks
Yves
I posted a request in Project Management about the same issue as your Question 1:
- Is it possible to give a variable name to order name rather than hard-coded string? This would give more flexibility for what I am trying to do.
The request number is MC-1179.
Could you please vote for it, and have other friends concerned by this issue
vote also for it?
Thanks
Yves