help with powerlanguage

Questions about MultiCharts and user contributed studies.
aljafp
Posts: 184
Joined: 28 Oct 2005
Been thanked: 1 time

help with powerlanguage

Postby aljafp » 11 May 2008

hi guys, would appreciate some comments
What's the difference between the 2 following statements ?

Buy 1 contract next bar at market;
Buy 1 contract this bar at market;

My understanding is the first statement will buy 1 at market at the next tick or the open of the next bar.

What about the second statement ?.. Does it mean the market order will be send immediately without waiting for the next tick to arrive ?
Is there anything else to take note of ?

thanks

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Re: help with powerlanguage

Postby Marina Pashkova » 13 May 2008

hi guys, would appreciate some comments
What's the difference between the 2 following statements ?

Buy 1 contract next bar at market;
If the IOG is enabled, the statement will buy at the next tick
If the IOG mode isn't enabled, the statement will buy at the open of the next bar
Buy 1 contract this bar at market;
This statement isn't allowed in PowerLanguage. The following statement should be used instead:

Buy 1 contract this bar at close;

aljafp
Posts: 184
Joined: 28 Oct 2005
Been thanked: 1 time

Re: help with powerlanguage

Postby aljafp » 13 May 2008

hi guys, would appreciate some comments
What's the difference between the 2 following statements ?

Buy 1 contract next bar at market;
If the IOG is enabled, the statement will buy at the next tick
If the IOG mode isn't enabled, the statement will buy at the open of the next bar
Buy 1 contract this bar at market;
This statement isn't allowed in PowerLanguage. The following statement should be used instead:

Buy 1 contract this bar at close;
thanks marina....

Is there a way for me to send a buy market order immediately once a condition is filled without having even to wait for the next tick ?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 14 May 2008

Hi aljafp,

Unfortunately, it can't be done.

aljafp
Posts: 184
Joined: 28 Oct 2005
Been thanked: 1 time

Postby aljafp » 28 May 2008

Hi aljafp,

Unfortunately, it can't be done.
MC.. any plans to improve on this ?

when a trade condition is satisfied.. i should be able to act on it immediately..
why do i have to wait until the next tick ?

thanks

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

Postby SUPER » 28 May 2008

It is my understanding that since the code runs on each tick of data, it will need a new tick to run again and place your order.

This is how trading softwares available on market work, it is nothing specific to MC.

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

Postby TJ » 28 May 2008

There are approx 25,000 seconds in a trading day. (7hours X 60 mins X 60 sec)

If the instrument you are trading has a volume of 25k, and that each order (tick) is for 100 shares. Then you will have an average of 250 ticks a day.
MC will send in your order after 100 seconds (avg).

If the instrument has a vol of 250k, the time is 10 seconds.
If the instrument has a vol of 2.5m, the time is 1 seconds.

Is this assumption correct?

User avatar
Marina Pashkova
Posts: 2758
Joined: 27 Jul 2007

Postby Marina Pashkova » 29 May 2008

There are approx 25,000 seconds in a trading day. (7hours X 60 mins X 60 sec)

If the instrument you are trading has a volume of 25k, and that each order (tick) is for 100 shares. Then you will have an average of 250 ticks a day.
MC will send in your order after 100 seconds (avg).

If the instrument has a vol of 250k, the time is 10 seconds.
If the instrument has a vol of 2.5m, the time is 1 seconds.

Is this assumption correct?
Hi TJ,

If your strategy generates signals on every tick, the assumption above is bascially correct.

Regards.

User avatar
MC_Prog
Posts: 330
Joined: 28 Feb 2007
Has thanked: 64 times
Been thanked: 35 times

Postby MC_Prog » 31 May 2008

It is my understanding that since the code runs on each tick of data, it will need a new tick to run again and place your order.

This is how trading softwares available on market work, it is nothing specific to MC.
This may be true, but it only serves to point out a common limitation in autotraders.

Human-initiated manual orders are, of course, sent in realtime as the user submits them.

From the trader's point of view, an option for computer-initiated automated orders to be sent in realtime _immediately_, without needing to wait for the tick stream, would be a significant enhancement.

The calculations posted in messages above indicate why :!:

This is an area where the opportunity to get ahead of the competition clearly exists.


Return to “MultiCharts”