IOG mode during Autotrade

Questions about MultiCharts .NET and user contributed studies.
amberouserous
Posts: 5
Joined: 30 Nov 2020
Has thanked: 1 time
Been thanked: 1 time

IOG mode during Autotrade

Postby amberouserous » 09 Sep 2022

I am using 60min bar for my strategy.
I have IOGMode(IOGMode.Enabled) in my script.

During realtime trading with autotrade, I noticed that when I have enter an order with limit order, my exit order will trigger at the next bar (ie 60 minutes later).
However when I use the same script on backtest, with backtest precision on (set at 1 min bar). I can get exit order execute much faster.

Below is a snippet of my strategy:

Code: Select all

protected override void CalcBar() { if (StrategyInfo.MarketPosition == 0 && EntryCondition == true { //Place entry Enter Limit order } if (StrategyInfo.MarketPosition != 0) { //place exit limit order } if (Bars.Status == EBarState.Close) { //strategy logic to determine EntryCondition } }
Questions: How can I trigger my exit limit order at the same bar as my entry order? (ie if I place an entry order at say 10:00am and get trigger at 10:15am. I like to place my exit order immediately, not wait until 11:00 am)

Thanks in advance

amberouserous
Posts: 5
Joined: 30 Nov 2020
Has thanked: 1 time
Been thanked: 1 time

Re: IOG mode during Autotrade

Postby amberouserous » 12 Sep 2022

anyone has an answer?

User avatar
Polly MultiCharts
Posts: 189
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 52 times

Re: IOG mode during Autotrade

Postby Polly MultiCharts » 12 Sep 2022

Hello amberouserous,

Please send us the test strategy and your workspace to support@multicharts.com, so that we can investigate the behavior in detail.


Return to “MultiCharts .NET”