Intrabarordergeneration

Questions about MultiCharts and user contributed studies.
iceman
Posts: 39
Joined: 23 Oct 2009
Has thanked: 16 times

Intrabarordergeneration

Postby iceman » 04 May 2011

Hi I am pretty new at this so sorry if don't make much sense. I have noticed that after your entry position is placed it takes a few bars for you exit signals to get into the market(trailing stop, stop loss etc) the profit target gets entered right away however so I am wondering if there is away to do this? Is there something to do with intrabarordergeneration ? and if so do you just open the script and put = true instead of = false?

Thanks
Iceman

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

Re: Intrabarordergeneration

Postby TJ » 04 May 2011

Hi I am pretty new at this so sorry if don't make much sense. I have noticed that after your entry position is placed it takes a few bars for you exit signals to get into the market(trailing stop, stop loss etc) the profit target gets entered right away however so I am wondering if there is away to do this? Is there something to do with intrabarordergeneration ? and if so do you just open the script and put = true instead of = false?

Thanks
Iceman
a lot of different things can affect your execution.
you have to post your code... and the log to show the problem.

sometimes the delay is in reporting from the broker, not the actual time of execution.

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 85 times

Re: Intrabarordergeneration

Postby NW27 » 30 Dec 2011

Hi,
I was looking for something else and came across the post.
I've noticed the same issue. Using the Intrabarordergeneration, it allows you to get into a trade a minute into a five bar but the creation of the orders for the exits (MC Setprofittarget or setbreakeven or setstoploss etc etc), do not appear until the 5min bar has completed.
So any price movement in the next 4min could kill you.

Not sure how you fix this?

Neil.

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

Re: Intrabarordergeneration

Postby TJ » 30 Dec 2011

Hi,
I was looking for something else and came across the post.
I've noticed the same issue. Using the Intrabarordergeneration, it allows you to get into a trade a minute into a five bar but the creation of the orders for the exits (MC Setprofittarget or setbreakeven or setstoploss etc etc), do not appear until the 5min bar has completed.
So any price movement in the next 4min could kill you.

Not sure how you fix this?

Neil.
Can't help you without the code.

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 85 times

Re: Intrabarordergeneration

Postby NW27 » 31 Dec 2011

TJ,

[IntrabarOrderGeneration = true]
Buy ("OZOPL2") 1 Contract Next Bar at 4000 stop ;
setstoploss(4*25);
setprofittarget(6*25);

Neil.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Re: Intrabarordergeneration

Postby SUPER » 31 Dec 2011

Deleted
Last edited by SUPER on 31 Dec 2011, edited 1 time in total.

SUPER
Posts: 646
Joined: 03 Mar 2007
Has thanked: 106 times
Been thanked: 84 times

Re: Intrabarordergeneration

Postby SUPER » 31 Dec 2011

Hi I am pretty new at this so sorry if don't make much sense. I have noticed that after your entry position is placed it takes a few bars for you exit signals to get into the market(trailing stop, stop loss etc) the profit target gets entered right away however so I am wondering if there is away to do this? Is there something to do with intrabarordergeneration ? and if so do you just open the script and put = true instead of = false?

Thanks
Iceman

Try this code for stoploss, if it works use same idea to create your profitTarget , Trailing Stop etc orders.

Code: Select all



[IntrabarOrderGeneration = True]

Inputs: StopPoints(10);
Vars: Intrabarpersist Mp(0);

Mp= MarketPosition;

If Mp=1 then Sell("LStopLoss")Next Bar at (EntryPrice - StopPoints) Stop;
If Mp=-1 then Buy to Cover("SStopLoss") Next Bar at (EntryPrice + StopPoints) Stop;

User avatar
Roman MultiCharts
Posts: 50
Joined: 28 Nov 2011
Has thanked: 21 times
Been thanked: 67 times

Re: Intrabarordergeneration

Postby Roman MultiCharts » 06 Jan 2012

Hi I am pretty new at this so sorry if don't make much sense. I have noticed that after your entry position is placed it takes a few bars for you exit signals to get into the market(trailing stop, stop loss etc) the profit target gets entered right away however so I am wondering if there is away to do this? Is there something to do with intrabarordergeneration ? and if so do you just open the script and put = true instead of = false?

Thanks
Iceman
Hi,
I was looking for something else and came across the post.
I've noticed the same issue. Using the Intrabarordergeneration, it allows you to get into a trade a minute into a five bar but the creation of the orders for the exits (MC Setprofittarget or setbreakeven or setstoploss etc etc), do not appear until the 5min bar has completed.
So any price movement in the next 4min could kill you.

Not sure how you fix this?

Neil.
Hi iceman and NW27

In this case it is necessary to allow unlimited entries and exits per bar. To do that please open format signals menu --> select your signal and click the format button --> go to the properties tab. Check Enable Intra-Bar Order Generation feature and select "allow unlimited entries and exits per bar". This feature is the additional one and cannot be enabled from the script.

NW27
Posts: 177
Joined: 25 Dec 2010
Has thanked: 40 times
Been thanked: 85 times

Re: Intrabarordergeneration

Postby NW27 » 06 Jan 2012

Hi Roman,

Thanks for responding.

That will be the answer.

Neil.


Return to “MultiCharts”