Intrabar Ordergeneration - question

Questions about MultiCharts and user contributed studies.
wegi
Posts: 124
Joined: 02 Jun 2009
Has thanked: 5 times
Been thanked: 13 times

Intrabar Ordergeneration - question

Postby wegi » 21 Mar 2014

Hi,

i tried to generate intrabar orders. my timeframe is 10min, forex, and i tested i high-low channel system, always reverse position on high or low channel.
Within a 10min bar it is possible, that i generate more than one order, because the symbol moves up and down twice or more.
I used settings: intrabarordergeneration with tick resolution. My code has only next bar orders: buy next bar and short nex bar.
But i only get one order for the 10min Bar.
Can Multicharts generate more than on order for a Bar?

thx Wegi

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

Re: Intrabar Ordergeneration - question

Postby Andrew MultiCharts » 21 Mar 2014

Hello wegi,

Yes, if...

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: Intrabar Ordergeneration - question

Postby ABC » 21 Mar 2014

wegi,

MC can generate more than one order per bar. My guess is that is has to do with your IOG settings. If you load your signal to a chart go to Format Signals and format this particular signal. Then switch to the Properties tab where you will see something like this:
Image
By default it's set to "Limit this signal to one entry and one exit per bar". Which would explain why you only see one trade per bar. Depending on what you want and how your code looks option 1 or 3 will allow more trades per bar.

Regards,
ABC
Attachments
IOGProperties.PNG
(8.07 KiB) Downloaded 631 times

wegi
Posts: 124
Joined: 02 Jun 2009
Has thanked: 5 times
Been thanked: 13 times

Re: Intrabar Ordergeneration - question

Postby wegi » 21 Mar 2014

Thx ABC, Andrew!


i forgott the properties page for the signal: "Allow unlimited signals..."

But with this settings, i did not get any signal and i think it is because the skript calculates some values different.

Here is a code snippet of what i am doing.

Code: Select all

//1. way, high low channel
LL = lowest(low,xLow);
LH = Highest(high,xHigh);

//2. way, calculate average and add some std. deviation for high channel
myAVG = average(smaP,smaLength);
mySMADistanz = StandardDev(c,SMADistPeriod,1)*SMADistFaktor;
LH = myAVG + mySMADistanz;
LL = myAVG - mySMADistanz;

//Ordergeneration for a lot of reverse entries within the channel
if mp = 0 then Begin
buy next bar at LL Limit;
sellshort next bar at LH limit;
End;

if MP = 1 then Begin
sellshort next bar at LH limit;
End;

if MP = -1 then Begin
buy next bar at LL limit;
End;
i am not sure, if highest, lowest and average are calculated the same way.
I only want them to be calculated for a finished 10min bar.

How can i do this?

Thx

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

Re: Intrabar Ordergeneration - question

Postby Andrew MultiCharts » 21 Mar 2014

i am not sure, if highest, lowest and average are calculated the same way.
Please open their codes and analyze them to find out.
I only want them to be calculated for a finished 10min bar.
How can i do this?
So you want the script to be calculated and orders generated, sent intrabar or you want the code to be calculated only at close of each bar?

wegi
Posts: 124
Joined: 02 Jun 2009
Has thanked: 5 times
Been thanked: 13 times

Re: Intrabar Ordergeneration - question

Postby wegi » 21 Mar 2014

Hi Andrew

i found out, that the values for highest, lowest and average are calculated new for each tick with in the 10min bar.
Thats why i dont get orders. What i need is, highest(h,10) should only be calculated at the end of the 10min Bar. The average only with the close of the 10Min Bar.
The price for the limit orders should be fix for 10 min. But if reached two or more times, orders should be generated.

Highest, Lowest, avearge .... should be calculated at the close of the 10 Min Bar.

Orders should be generated more then one with in the Bar, if i set IOG

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

Re: Intrabar Ordergeneration - question

Postby TJ » 21 Mar 2014

Hi Andrew
i found out, that the values for highest, lowest and average are calculated new for each tick with in the 10min bar.
Thats why i dont get orders. What i need is, highest(h,10) should only be calculated at the end of the 10min Bar. The average only with the close of the 10Min Bar.
The price for the limit orders should be fix for 10 min. But if reached two or more times, orders should be generated.
Highest, Lowest, avearge .... should be calculated at the close of the 10 Min Bar.
Orders should be generated more then one with in the Bar, if i set IOG
try

highest(h,10)[1]


Return to “MultiCharts”