IntraBar order

Questions about MultiCharts and user contributed studies.
love_to_trade
Posts: 4
Joined: 17 Dec 2014
Been thanked: 1 time

IntraBar order

Postby love_to_trade » 17 Dec 2014

Hi! I am new to Multicharts, trying to make simple strategy with Point and Figures. I don't understand how to make intra bar execution.

my code:

Code: Select all

if (Low[1] < Low AND (High[1]+Slip) < CurrentBid) then
Buy ("X") NumOfLots Contract Next Bar At (High[1]+Corr1) stop ;
Image

I've tried all types of orders, but nothing works as i wish. So, idea is simple it should buy when current price is above high of previous bar + Sliip.
Any help will be highly appreciated.
Thanx.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: IntraBar order

Postby TJ » 17 Dec 2014

Hi! I am new to Multicharts, trying to make simple strategy with Point and Figures. I don't understand how to make intra bar execution.

my code:

Code: Select all

if (Low[1] < Low AND (High[1]+Slip) < CurrentBid) then
Buy ("X") NumOfLots Contract Next Bar At (High[1]+Corr1) stop ;
Image

I've tried all types of orders, but nothing works as i wish. So, idea is simple it should buy when current price is above high of previous bar + Sliip.
Any help will be highly appreciated.
Thanx.


To enable intra bar execution, you add this line to the beginning of your code:

Code: Select all


[IntrabarOrderGeneration=True]
When IOG is enabled,
your order will be sent at the next tick instead of the NEXT BAR. (same coding syntax)

Bear in mind that IOG was originally designed for market orders. Although some have found success with limit orders, if you don't need immediate order execution, you should avoid using IOG.

love_to_trade
Posts: 4
Joined: 17 Dec 2014
Been thanked: 1 time

Re: IntraBar order

Postby love_to_trade » 17 Dec 2014

Actually I wrote it, but nothing has happened. It still buy only on close or on open price.

Code: Select all

[IntrabarOrderGeneration = TRUE]

if Close > High[1] then
Buy next bar at high[1] stop ;
Switched to candlesticks - same problem.

love_to_trade
Posts: 4
Joined: 17 Dec 2014
Been thanked: 1 time

Re: IntraBar order

Postby love_to_trade » 17 Dec 2014

Hi, Tj!
Thanx for you reply.
I've added [IntrabarOrderGeneration=True].
But it won't helped, same trouble - open position at close or at open.
Do you have some simple example of IOG?

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: IntraBar order

Postby TJ » 17 Dec 2014

Hi, Tj!
Thanx for you reply.
I've added [IntrabarOrderGeneration=True].
But it won't helped, same trouble - open position at close or at open.
Do you have some simple example of IOG?
If this is a back test,
please study the following article to understand how orders are filled in backtesting:
How Signals are Calculated.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: IntraBar order

Postby Henry MultiСharts » 18 Dec 2014


love_to_trade
Posts: 4
Joined: 17 Dec 2014
Been thanked: 1 time

Re: IntraBar order

Postby love_to_trade » 18 Dec 2014

I've checked - Bar Magnifier is not available.
So, Is there any opportunity using Multicharts or maybe Multicharts.Net to backtest a strategy with non standard chart type, when orders are executed intra bar?
Thanx.

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: IntraBar order

Postby Henry MultiСharts » 18 Dec 2014

love_to_trade,

I would recommend using Regular chart types + Bar magnifier + IOG (if multiple calculations per bar required) for precise backtesting results.

User avatar
Andrew MultiCharts
Posts: 1587
Joined: 11 Oct 2011
Has thanked: 931 times
Been thanked: 559 times

Re: IntraBar order

Postby Andrew MultiCharts » 23 Dec 2014

Orders can be filled inside a bar even if IOG is off. IOG is used for additional intrabar script calculations. If IOG is off and your code generates an order at close of a bar, the order will be placed at open of the next bar. Since you are using stop order, the order can be filled not only at open, but at any price within the next bar. Bar Magnifier feature is not available for Point and Figure chart type, what means Intrabar Price Movement Assumptions are used to determine when the order should be filled.

In your case the strategy generates orders with such prices, so they are filled at O/H of bars, not inside.


Return to “MultiCharts”