I am trying to trigger a Market Order trade using Daily charts that generate the order when the daily bar closes.
MC is sending the order to IB but because it is after RTH the order is getting held by IB.
I have the "Use outside RTH tag for orders" checked in the Broker profile but the order never gets sent to IB with this option active. I looking for any options to get this to work.
Here is my code for testing purposes......
[IntrabarOrderGeneration = False]
inputs: Length( 1 ) ;
condition1 = Close > Open ;
condition2 = Close < Open ;
if condition1 then
Buy ( "GCS Test LE" ) 100 shares this bar on close ;
if condition2 then
Sell ( "GCS Test SE" ) 100 shares this bar on close ;
Triggering trade in ETH on daily bar.
- JoshM
- Posts: 2195
- Joined: 20 May 2011
- Location: The Netherlands
- Has thanked: 1544 times
- Been thanked: 1565 times
- Contact:
Re: Triggering trade in ETH on daily bar.
Instead of submitting the trade exactly on the close of the daily bar, you could also submit your order a few minutes prior. If you have a longer-term trading strategy, the impact this has on the entry price is negligible and the benefit is that the odds are much higher that your order will be executed.I am trying to trigger a Market Order trade using Daily charts that generate the order when the daily bar closes. (...)
I looking for any options to get this to work.
For example:
Code: Select all
[IntrabarOrderGeneration = true];
Inputs:
PreClosingTime(1725),
ClosingTime(1730);
Variables:
myEnterLongCondition(false);
myEnterLongCondition = Close > Open;
// Only submit market orders in the few minutes before the close
if (MarketPosition(0) = 0) and
(Time >= PreClosingTime) and (Time <= ClosingTime) then begin
Buy ("GCS Test LE") 100 shares this bar on close;
end;