Trabalho concluído
Termos de Referência
EA upgrade Document.
The EA is in good working condition. We just need to bring some updates.
1) Remove. RSI, Stochastic, Bollinger Band Rules from EA.
https://gyazo.com/8f1eccb47d5079711b894002e6f7387f
2) Increase pipstep based on number of trades: True/False. If false, do nothing. If true:
New variables: Step1, Step2
Currently EA has a variable called “Step” which defines the grid distance for opening of trades and setting pending orders. EA opens many trades in sideway markets, we want to avoid that.
When EA opens a trade and wants to decide to open its counter trades (pending orders), it should see
"if total lotsize of open trades (add all open sells and buys) divided by variable “Volume in Lot” is greater than x-number1 (new customizable variable), then use Step1 as grid."
And
"if total lotsize of open trades (add all open sells and buys) divided by variable “Volume in Lot” is greater than x-number2 (new customizable variable), then use Step2 as grid."
3) Increase pipstep when drawdown grows. TRUE/FALSE. If false, do nothing. If true:
When the session DD (Floating of all open trades) reaches “X number of Dollars”, Next open trade will trade of Step1 variable as pipstep for setting pending orders
When the session DD (Floating of all open trades) reaches “X2 number of Dollars”, Next open trade will trade of Step2 variable as pipstep for setting pending orders
4) Negative Averaging of Losing Trades: True/False. If false, do nothing. If true:
New variable in EA “Negative Average Trade Levels.” which holds 3 or 6 or10 etc, and “Profit_from_Neg_Avg”
"if there are “Negative Average Trade Levels.” or more buy grid levels above the current price, calculate the breakeven price for those trades where if all of the are closed we will be in 0 profit/loss, then add “Profit_from_Neg_Avg” to that price set a TP for all of them at that price" so now if all of them are closed we will be in profit. If breakeven is at 1010 and we have 5 as value of Profit_from_Neg_Avg, then TP for all buys will be at 1015 so we end up in 5pip profit once those are closed.
“Every time a new level is reached, EA should check
If the average is already there and new level is found, add the buy trades on this level and recalculate the average. This means if we more buy trades go against us in future levels all become included in the Averaging process and they all will have a combined TP at one price point.
Same as above for SELL trades as well.
5) Add a Variable in EA “USE Percentage of Account: True/False”
If this is false, EA behaves exactly as it behaves now. If this is True, the value entered in variables “Total Loss in Money”, “Target Money” and “Volume in Lot” will be treated as percentage of account balance. For example. if Volume in Lot is set to “0.001” and our account balance is 3000$, then the lot size 0.001x3000 = 0.03. Same for Target money. If I put 1, then it means 1% of 3000$ which is 30$. EA calculates all these three values at the beginning of each fresh session and remembers that until all trades are closed and a new session starts. That means once EA take 0.03 trades, all its subsequent trades will be 0.03 until everything is closed in profit/loss and new Percentage of balance is calculated.
Print these 3 variables on Chart: (display their values on chart info box)
6) Add Trading Sessions:
a. Start trading: Hour:min
b. Stop Trading: Hour:min
c. Start Trading2: Hour:min
d. Stop Trading2: hour:min