Market order to be worked with a tick

Questions about MultiCharts .NET and user contributed studies.
dverschoor
Posts: 4
Joined: 13 Jun 2013

Market order to be worked with a tick

Postby dverschoor » 17 Jun 2013

I have a market order based on a Study.
For arguments sake lets say its a moving average cross over on a 15 minute bar

Now based on this signal I want to buy... but instead of paying the offer
I want to always buy at the bid and move the bid up with other bids until i get set.
If the offer size falls to less than 10 lots (on futures) then I buy at the offer

How would I go about doing that please

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Market order to be worked with a tick

Postby Henry MultiСharts » 18 Jun 2013

Hello dverschoor,

Market order fill price is determined by the broker. If you want to send an order that should be filled at specific or better/worse price - you need to use limit/stop order.
That is possible to get the current ask/bid price from data2, from data loader or from the status line in order to set the price for the order.

dverschoor
Posts: 4
Joined: 13 Jun 2013

Re: Market order to be worked with a tick

Postby dverschoor » 18 Jun 2013

Ok. Thanks. I think I know what you mean

There is a callback called calcbar() that sets my trade strategy long or short

Say I want to evaluate that based on a 1 hour bar but also using real time data to trade
Is the best way to create 2 signals 1 that sets trade info based on the hourly data and pass trade instructions through a global variable ?

If agreed how do I setup the global variable ?

Thanks

User avatar
Henry MultiСharts
Posts: 9165
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2957 times

Re: Market order to be worked with a tick

Postby Henry MultiСharts » 19 Jun 2013

Say I want to evaluate that based on a 1 hour bar but also using real time data to trade
Please check the following article: How Signals are Calculated


Return to “MultiCharts .NET”