I read this thread:
viewtopic.php?f=1&t=50344&p=124220&hili ... rs#p124220
I just want to be sure that one must use the twslink DLL in order to accomplish this.
How will the the strategy know which attached order got triggered and which got cancelled ?
I saw this is the PowerLanguage documentation: "!From Strategy To Broker MP Synchronizer!"
Has anyone used this ?
Attached Orders in a strategy - OCO Interactive Brokers
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Attached Orders in a strategy - OCO Interactive Brokers
MultiCharts needs to update the Keyword definition. This is not in the Wiki or the PLE.
ONCE (Reserved Word)
Reserved word used to specify that the EL statement or begin-end block that follows will only be executed once.
Syntax
ONCE ( [ optional boolean expression ] ) { follow by single statement or statement block }
[begin]
Statement(s)
[end]
Example
Once Value1 = GetAppInfo( aiApplicationType );
Performs the assignment of Value1 a single time. This improves performance instead of using a separate conditional expression (which must be tested on each bar) such as:
if CurrentBar = 1 then Value1 = GetAppInfo( aiApplicationType );
Additional Examples
Once ( MarketPosition = 1 )
Begin
ClearPrintLog;
Print( "Log Header" );
End;
Clears the print log and prints a header the first time the market position equals once.
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2223 times
Re: Attached Orders in a strategy - OCO Interactive Brokers
Wow - thanks for that TJ.
So Once can execute statements once conditionally or unconditionally.
Yes.