Termos de Referência
1. The idea of the trading system is as follows:
The robot places a BUY order at the lowest price of the last “n” candles. When the order is filled, it places a SELL order at the highest price of the last “m” candles. The robot must have 2 modes:
1 – long only. In this mode the robot goes long and after the buy order has been filled it places the sell order. When the limit sell order is filled it places o new limit buy order.
2 – long and short. In this mode when there is a sell signal, the robot closes the long position (if applicable) and enters a short position.
The robot will trade in 15-minute, 30-minute, 1-hour and 1-day time frames. The user must have the option to close position at a given time of day or not (i.e. day trade or swing trade modes).
Trading Signals:
- Buy signal: there is not a “real signal”, since the robot places a limit buy order at the lowest price of the last “n” candles + or – a value entered by user (eg. $0.01)
- Sell signal – alternative 1: if a buy order is filled, the robot places a limit sell order at the highest price of the last “m” candles + or – a value defined by user (eg. $0.02/share)
- Sell signal – alternative 2: if the highest of “m” candles is reached, the robot sends a limit order at the open of the next candle. The price of this order is the highest of “m” candles + or – a value defined by user (eg. $0.02/share). The objective here is to take advantage of gaps.
4. Positions are closed at opposite signals: LONG positions are closed at Sell signals, and SHORT positions are closed at Buy signals.
5. Positions are opened only when order is filled.
There must be na option to:
(i) go long only or
(ii) go long and short, i.e. when sell signal shows up, long position is closed and short position is opened, as mentioned in the begining.
6. Additional filters for opening a position: NA
7. Additional filters for closing a position: NA
8. Close by Take Profit — there must be the alternative to choose to close a position based on a fixed $ profit (e.g. $1.00/share)
9. Position management
A stop loss can be set if user decides to. Stop loss can be set at a given number or candles (stop in time) or fixed value ($0.50/share).
I want to have access to the code and edit it myself if necessary.