Open Next Bar type strategies w/ multiple DataStreams ?

Questions about MultiCharts and user contributed studies.
var_o
Posts: 3
Joined: 31 Jul 2011
Has thanked: 1 time

Open Next Bar type strategies w/ multiple DataStreams ?

Postby var_o » 22 Aug 2011

My strategy involves something like

Code: Select all

Inputs : ....
Variables : A(0, Data2), B(0, Data3), C(0, Data4), D(0, Data5),...

Codes
Codes
Codes

If ... Then Buy next bar at open of next bar ;
If ... Then Sell short next bar at open of next bar ;



But MC does not allow me to do so.
The error message box said:

"Message: Error in study "xxx" : : Open Next Bar type strategies calculation is not permitted on multiple DataStreams."

Is there a way I can use multiple DataStreams with Open Next Bar strategies ???

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Open Next Bar type strategies w/ multiple DataStreams ?

Postby Dave Masalov » 22 Aug 2011

Is there a way I can use multiple DataStreams with Open Next Bar strategies ???


Unfortunately, it is not possible.
These users thanked the author Dave Masalov for the post:
var_o

var_o
Posts: 3
Joined: 31 Jul 2011
Has thanked: 1 time

Re: Open Next Bar type strategies w/ multiple DataStreams ?

Postby var_o » 22 Aug 2011

So, will it be appropriate if I request this feature for the next version of MC ?

and

How can I rewrite it as an indicator to make it display the same thing as Strategy?
Please forgive me on this question. I am total newbie for the platform.

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Open Next Bar type strategies w/ multiple DataStreams ?

Postby Dave Masalov » 23 Aug 2011

var_o,

Do you mean you want to send a market order at open of the next bar?

Buy next bar at open of next bar ; - this line won't compile, however you can use the following command:

Code: Select all

buy next bar market;


and this works with multiple data streams.

var_o
Posts: 3
Joined: 31 Jul 2011
Has thanked: 1 time

Re: Open Next Bar type strategies w/ multiple DataStreams ?

Postby var_o » 23 Aug 2011

Dave Masalov wrote:var_o,

Do you mean you want to send a market order at open of the next bar?

Buy next bar at open of next bar ; - this line won't compile, however you can use the following command:

Code: Select all

buy next bar market;


and this works with multiple data streams.


what if I would like to
Buy next bar at Open of next bar+A STOP;

I don't think I can code it as
Buy next bar market+A STOP;

any solutions ?

User avatar
Dave Masalov
Posts: 1712
Joined: 16 Apr 2010
Has thanked: 51 times
Been thanked: 485 times

Re: Open Next Bar type strategies w/ multiple DataStreams ?

Postby Dave Masalov » 23 Aug 2011

var_o,

Unfortunately it cannot be done by means of script.

sptrader
Posts: 639
Joined: 09 Apr 2010
Location: Colorado
Has thanked: 403 times
Been thanked: 238 times
Contact:

Re: Open Next Bar type strategies w/ multiple DataStreams ?

Postby sptrader » 23 Aug 2011

Maybe: Buy next bar at close + A STOP; (intra-day would be very close)


Return to “MultiCharts”