Lets suppose I have a moving average system like this on a 5 minute chart:
if c>average(c,50) then buy next bar at low-range limit;
if c<average(c,50) then sell short next bar at low+range limit;
Now lets assume there is a buy order at 1500 limit and the current price is 1505. Now the market moves down to 1500 and touches it (1 contract traded) and I am not filled because I am back in the queue. Now lets assume the market moves back up.
Is there a way that i autotrade this by adjusting my limit price up as soon as a better bid comes in ? This would mean like chasing the market up until I am filled.
How would you do that ?
Thanks
Autotrade Execution question
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Autotrade Execution question
I know this option but it just does not do what i described. I dont want to do a market order after a specific time period. I want to chase the market after a signal is triggered but I am not filled at the broker. Is that even possible to program in MC ?
Re: Autotrade Execution question
Hi amadeu1,
for my understanding MC always does what you are asking.
If your code is:
if c>average(c,50) then buy next bar at low-range limit;
and condition is true then MC submits next bar a low-range limit order that stays for all bar time.
At next bar if condition is always true then MC cancels old limit order and submits a new low-range order, so if low goes up also limit order goes up.
Massimo
for my understanding MC always does what you are asking.
If your code is:
if c>average(c,50) then buy next bar at low-range limit;
and condition is true then MC submits next bar a low-range limit order that stays for all bar time.
At next bar if condition is always true then MC cancels old limit order and submits a new low-range order, so if low goes up also limit order goes up.
Massimo
- Andrew MultiCharts
- Posts: 1587
- Joined: 11 Oct 2011
- Has thanked: 931 times
- Been thanked: 559 times
Re: Autotrade Execution question
If you want to move the order following the price, you can change the order's price on every code calculation base on last price on the chart.I know this option but it just does not do what i described. I dont want to do a market order after a specific time period. I want to chase the market after a signal is triggered but I am not filled at the broker. Is that even possible to program in MC ?