automate order problem

Questions about MultiCharts and user contributed studies.
rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

automate order problem

Postby rgranero » 14 Dec 2010

Hi,

orders like:

buy stop at h+minmove
sell stop at l-minmove

are filled at h or l without minmove (but in order position tracker are send correctly).

The setting of automate is sync and convert unexecute order after 5 second in market order.

Thanks
Riccardo

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

Re: automate order problem

Postby TJ » 14 Dec 2010

Hi,

orders like:

buy stop at h+minmove
sell stop at l-minmove

are filled at h or l without minmove (but in order position tracker are send correctly).

The setting of automate is sync and convert unexecute order after 5 second in market order.

Thanks
Riccardo
you must be backtesting.

see this thread for answer.
viewtopic.php?f=1&t=7999

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: automate order problem

Postby rgranero » 15 Dec 2010

Thanks for the topic. But my problem is diffrent (how appear to me...)

I backtested and strategy work correctly...

The strange is: in the code I wrote buy at h+minmove or number, but when price arrive to h then the order is send to market.

Thanks for the attention TJ

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

Re: automate order problem

Postby TJ » 15 Dec 2010

Thanks for the topic. But my problem is diffrent (how appear to me...)

I backtested and strategy work correctly...

The strange is: in the code I wrote buy at h+minmove or number, but when price arrive to h then the order is send to market.

Thanks for the attention TJ
>The strange is: in the code I wrote buy at h+minmove

but your question was in

>buy stop at h+minmove
>sell stop at l-minmove

they are 2 different things
which is the problem?


can you post your code?

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: automate order problem

Postby rgranero » 15 Dec 2010

buy n contract next bar at H+MinMove stop;

sell short n contract next bar at L-MinMove stop;

thanks

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

Re: automate order problem

Postby TJ » 15 Dec 2010

buy n contract next bar at H+MinMove stop;

sell short n contract next bar at L-MinMove stop;

thanks

do you intend it as a STOP-LOSS order? or STOP-LIMIT order?

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: automate order problem

Postby rgranero » 16 Dec 2010

When marketposition=0

then stop limit order, correct?

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

Re: automate order problem

Postby TJ » 16 Dec 2010

When marketposition=0

then stop limit order, correct?

STOP-LIMIT orders are not supported yet.

see this thread for answer.
viewtopic.php?f=1&t=7999

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: automate order problem

Postby rgranero » 16 Dec 2010

Ok, but whe I put BuY at h+minmove stop MC send the oredr when the price touch h. Therefore MC support stop order, but not correctly! Right?

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

Re: automate order problem

Postby TJ » 16 Dec 2010

Ok, but whe I put BuY at h+minmove stop MC send the oredr when the price touch h. Therefore MC support stop order, but not correctly! Right?
On backtest without using Bar Magnifier, the BUY is executed at HIGH, and SELL is executed at LOW.


For more information on programming autotrade and backtesting,
you can download this ebook:
The essential EasyLanguage programming guide
it allows you to quickly look up usage and syntax concepts and examples for the most commonly used features of EasyLanguage.

you can get the book here:
https://www.multicharts.com/multicharts ... mentation/

ps. this is a TS document, but the operation is similar.


[edit] note on terminology:
MultiCharts' Bar Magnifier is equivalent to
TS's “look inside bar back-testing” (LIBB).

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: automate order problem

Postby rgranero » 17 Dec 2010

TJ, then when I automate a TS with real time data and TS put one stop order (buy at h+minmove stop) what happen?

To me sometime works an the order is execute after the price go over h+minmove, somtime the order i sexecute at h...

I come from TS 2000i and this is the first time I work in real time...

Thanks for the advice.

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

Re: automate order problem

Postby TJ » 17 Dec 2010

TJ, then when I automate a TS with real time data and TS put one stop order (buy at h+minmove stop) what happen?

To me sometime works an the order is execute after the price go over h+minmove, somtime the order i sexecute at h...

I come from TS 2000i and this is the first time I work in real time...

Thanks for the advice.

can't tell you much without the code and the trade log...

you should go to Live Chat if you feel this is a bug.

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

Re: automate order problem

Postby Dave Masalov » 17 Dec 2010

Dear rgranero,

Please come to our Live Chat between 6:30AM and 2PM EST Mon-Fri or post the screenshots of your code in PLE, orders shown on the chart and Order and Position tracker as well as the detailed description of the situation.

rgranero
Posts: 56
Joined: 26 Jul 2010
Has thanked: 4 times
Been thanked: 1 time

Re: automate order problem

Postby rgranero » 21 Dec 2010

Thanks Dave and TJ, I did a little change in the code and now seem to work.

Riccardo.


Return to “MultiCharts”