I am writing a strategy that uses two symbols (both on 1-min bar charts), but only trades the main symbol (BarsInProgress == 0). CalculateOnBarClose is set to TRUE!
My questions are:
1) Since it can happen that the main symbol doesn't have a tick for a while or even misses a full bar I want to send entry/exit orders based on completed bars from BOTH symbols. In the OnBarUpdate() method I would place an order like:
MyEntryOrder = EnterLongLimit(0, false, MyUnits, MyEntryPrice, "Limit_Entry_L");
Is this correct so that even if the secondary symbol called the OnBarUpdate() method (BarsInProgress == 1) this order:
- would be placed (sent to broker)
- and also refer to my main symbol?
2) To my knowledge I need to resend that order to keep it alive, right? On what events am I required to resend? For example:
- OnBarUpdate() of ANY symbol
- OnBarUpdate(), but only for the symbol that the order trades (here when BarsInProgress == 0)
- any other events like OnExcecution(), ...
3) This is a limit order that may only be partially filled for a while. If I resend the order do I need to take into account the amount that has already been filled or can I keep resending the original order without changing the number of shares (stored in "MyUnits")? Whatever the answers is: does it also apply to resending EXIT orders?
4) Is it possible to put the text of the signal into a string variable? Example:
string MyEntryName = "Limit_Entry_L"; MyEntryOrder = EnterLongLimit(0, false, MyUnits, MyEntryPrice, MyEntryName);
Thanks a lot,
NutFlush




Comment