If I want to send market order to buy some contracts at the same time, there may be possible to buy higher price in last fews contracts.
Any possible to send market order with delay?
If I want to send some contracts market order, can MC allow send market order with little delay for each contract?
For example, place 5 contracts market order at 9:30
Then MC send 1 contract market order at 9:30:00, 9:30:10, 9:30:20, 9:30:30, 9:30:40 (total 5) respectively
Market Order Delay
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: Market Order Delay
Hello, kinwai!
You can manage the delay from the code, here is an example:Any possible to send market order with delay?
Code: Select all
RecalcLastBarAfter(1);
Input: total_number_of_contracts(100);
Input: total_number_of_splits(5);
Input: delay_time(10);
Input: start_time(163000);
var: contracts_res(0);
var: intrabarpersist num(0);
var: intrabarpersist st(0);
var: intrabarpersist de(0);
var: name("");
contracts_res = round(total_number_of_contracts/total_number_of_splits, 0);
once
begin
cleardebug;
st = start_time;
name = "0";
end;
if time_s >= st and time_s < st + 20 then
begin
buy (name) contracts_res contracts next bar market;
if total_number_of_splits > num + 2 then
begin
de = de + delay_time;
num = num + 1;
st = start_time + de;
name = NumToStr(num, 0);
end;
end;
You can do this on a 10-seconds chart. And you will need to enable pyramiding in Format -> StartegyProperties -> Properties tab -> Position Limits - "Allow up X entry orders in the same direction..."Then MC send 1 contract market order at 9:30:00, 9:30:10, 9:30:20, 9:30:30, 9:30:40 (total 5) respectively