İş tamamlandı
İş Gereklilikleri
Design a program that combine these two functions: (1)Open and close positions of SAR (2)the number of opening positions should be automatically doubled by the number of loss.
1.Trade automatically according to the Parabolic SAR index on the K-line
When the price of candlesticks on the k-line crosses Parabolic index in an upward direction, open a buy position. When the price crosses Parabolic index in a downward direction, open a sell position. After open a position, set a 300 points’ fixed stop-profit, and the Stop-Loss is set according to the current Parabolic index, and it can timely change with progressive increase or decrease of the Parabolic index, and change into a moving stop-loss.
Detailed requirements:
(1)The trading style can be read from the current k-line chart.
(2)When the conditions of opening a position is matched, but the position in the same direction has already existed, then don’t continue holding the quondam position, only change the Stop-Profit and Stop-Loss (Stop-Loss is set according to the current Parabolic index). If holding the reverse position, set a new position at the same time when close the previous position.
(3)When operate the Expert Advisor, if the current position has stopped loss, set a reverse position at the time it stopped, and set the Stop-Profit and Stop-Loss at the same time (the Stop-Loss is set by the current Parabolic index), trading in this kind of circulation.
(4)If the position has stopped profit, continue waiting for the matched condition and then set the new position.
2.The number of opening positions can be automatically revised according to the number of loss, and adding time limit of opening positions to the EA.
Detailed requirements:
(1)After closing the profit position, the number of opening positions do not double, keeping it same as the number of opening positions that set by the original system.
(2)After closing the loss position, EA should double the number of opening positions automatically, until meet the profit position and close them. For example, 1 loss position is closed, when open positions again, EA should be doubled to 2 positions automatically. If these 2 positions are closed as loss positions, EA should open 4 positions when open positions again. If these 4 positions are still closed as loss positions, EA should open 8 positions when open positions again. The rest should be done in the same manner, until the positions are closes as profit positions, and the limit is 16 positions.
(3)Time limit of opening positions: Every day 4:00-19:00, during this period, don’t establish new positions, and the positions that already exist shouldn’t be closed compulsively.
(4)When Auto system EA is removed from the current K-line then is opened again, the original number of loss should be cleared, and add up again.
3.The auto trade system allow myself to open and close positions.
Detailed requirements:
(1)When the conditions of opening a position is matched, but the position in the same direction has already existed, then don’t continue holding the quondam position, only change the Stop-Profit and Stop-Loss (Stop-Loss is set according to the current Parabolic index). If holding the reverse position, set a new position at the same time when close the previous position.
(2)When close positions manually, the auto system can’t open positions immediately, instead, open positions when the next conditions is matched.
This statement shall be governed by Chinese, English version is not so professional.
订制结合SAR开仓与关仓和开仓手数按亏损次数自动翻倍为一体的自动交易程序。
一. 依据当前K线图上的Parabolic SAR指标进行自动交易。
当K线图上蜡烛柱的价格上穿抛物线指数时买入(或下穿抛物线指数时卖出),开仓后设300点的固定止赢,止损则根据当时抛物线指数确定,并且止损能随抛物线指数递增(或递减)时做即时更改变成移动止损。
具体要求:
1.交易品种从当前的K线图上读取;
2.当符合建仓条件时,但已有同向仓位,不建新的头寸,继续持原有仓位,只更改止赢和止损(止损则根据当时抛物线指数设定);若持有的是反向仓位,则平仓同时建立新的仓位;
3.在执行自动交易系统时,如果当前头寸止损了,就在止损的同一时间建立反向仓位,同时设定止赢和止损(止损则根据当时抛物线指数设定),如此循环的交易;
4.当现有头寸在预设止赢点止赢了,就继续等待符合建仓条件时再建仓。
二.开仓手数能按亏损次数翻倍而自动修改和在EA中添加开仓时间的限制。
具体要求:
1. 平获利仓后,再次开仓手数不翻倍,按原系统设定开仓手数一样不作修改;
2.自动平亏损仓后,再次开仓手数EA要自动翻一倍,如果连续亏损,那么开仓手数就连续翻倍,一直到平获利仓为止。例如:平1手亏损仓,再次开仓时EA要自动翻倍改成2手,如果这2手平仓是亏损仓,那么再次开仓应该自动翻倍改成4手,如果这4手平仓还是亏损仓,那么再次开仓自动翻倍成8手,就这样连续翻倍,直到平的仓为获利仓为止或最大16手为限。
3.开仓时间的限制:每天的04:00——19:00之间不建立仓位,已有的仓位在此期间不强制平仓。
4.自动系统EA在当前的K线图上移除后重新打开时,原亏损次数清零,重新累计。
三.自动交易系统允许手动平仓与开仓。
具体要求:
1. 当符合建仓条件时,但已有同向仓位,不建新的头寸,继续持原有仓位,只更改止赢和止损(止损则根据当时抛物线指数设定);若持有的是反向仓位,则平仓同时建立新的仓位;
2.手动平仓后,自动系统不能立即开仓,而是等下一次符合条件再开仓。
本陈述以中文为准,英文版本不够专业。