Техническое задание
I want a robot that can run autonomously on an index, say US30 index whereby I can set a simple strategy.
I want to set limit orders that trigger every incremental X points.
If the market is at 39,000 I want to sell X per point at Y incremental point intervals based on the index level.
If X=1 and Y= 50 I'd expect the following to happen
P=50 and L=400
The market rises to 39,050 I sell at (X) 1 unit per point and I apply a stop of 400 points (L) (39,450) and a take profit (P) at 50 points (39,000).
If the market rises or falls I want the robot to place a second, third, fourth, nth trade at any higher or lower levels at the X interval (50 points)
I want a maximum (M) of 10 trades to be open at any time.
I don't want two trades to be placed at the same level.
If the market continues to rise I keep executing every 50 points but clearly the first trade will stop out at 39,450 and the second at 39,500 third at 39,550. If the market just goes up I lose 800 points.
If the market falls I don't execute anything but if I manage to place any trades at 39,050 or 39,100 and then the market falls I will take 50 points on the 39,100 trade when it falls to 39,050 and 50 point on the 39,050 trade when the market falls to 39,000.
At that stage I have no further trades in the market and i need to wait for the market to rise again to 39,050 but have taken 100 points in profit.
The strategy could be reversed to a market buy strategy if I wanted to buy every time the market fell 50 points adding the same stops and take profit points.
I'd like the robot to work on any market but the parameters of X, Y, P, L & and M should be adjustable.