Hi,
I know PlaceTrade returns a Transaction object. What in the Transaction object states a transaction actually has taken place?
I know PlaceTrade returns a Transaction object. What in the Transaction object states a transaction actually has taken place?
Rename
It cannot know. Just like when you place a trade at the end of the day, you cannot know whether or not it will fill the next day.
Thanks Glitch.
Mike
Mike
Well, you're not going to know on the current, PlaceTrade bar if the trade was taken, but you can certainly query the backtester as to whether or not the trade occurred on the following bar.
CODE:
public override void Execute(BarHistory bars, int idx) { if (HasOpenPosition(bars, PositionType.Long)) { WriteToDebugLog(LastOpenPosition.EntryBar + "=entryBar " + LastOpenPosition.EntryDateString + "=entryDate"); } }
Hi,
Yes, this works!
I am wondering the meaning of IsCompleted
in the Transaction object.
Thanks!
Yes, this works!
I am wondering the meaning of IsCompleted
in the Transaction object.
Thanks!
IsCompleted is real-only property used internally to enable edits for orders.
Your Response
Post
Edit Post
Login is required