Termos de Referência
Hi, I am trying to get an EA to manage my trades with just the click of a button. This is the NNFX way for those who are wondering.
I am trying to trade futures, so the entry would be per 2 units increment. This formula should only work with even numbers because of the two halves. However, I would like to set an exception to the previous mentioned condition as I would like to be able to set only one unit, which would only follow part A in the following instructions.
This trade assistant consists of the following:
-Average true range of 14 periods (The ATR is in all mt4s and mt5s). It is just an average of how much the price has moved in the last 14 periods or candles.
-Two parts of the same trade. Let’s call them Part A and Part B.
-Stop loss.
-Take profit, which would lead into the adjustment of the stop loss.
-If the conditions are given, trailing stop that would follow the price 1.5 ATR from the highest if buying (or lowest if selling) closed price.
-A way of selecting close all positions
-A way of selecting the number of contracts I want to place.
-A way of selecting buy or sell with just one click.
-A way of changing any input mentioned such as the periods of the ATR, distance of Stop loss, distance of Stop loss of Part B after Part A reached profit, trailing stop distance and all of that.
-A risk calculator that would recommend me the amount of contracts to enter(this needs to be displayed in the box were the buttons to buy, sell, and close position are) based on percent or fixed dollar quantity to risk. The amount should be normally changing because the amount of risk should be 1.5 ATR and the 14 period ATR is always changing.
Lest do the following example.
Buy Example:
Stop Loss: Stop loss is set as 1.5 x ATR below the entry price. For instance, if ATR was 100, then the stop loss would be 150. This goes for both parts A and B
Take profit: Take profit needs to be 1 x ATR above the entry point. This only goes for part A
After taking the first profit: The trade B’s stop loss if moved to the entry point. This only goes for part B
Trailing stop: Trailing stop is activated only after the price has moved and closed 2 x ATR from the trade entry price. The trailing stop is 1.5 x ATR away from the highest closed price. This trailing stop can be adjusted each time the price closes to a new higher price than the one used to activate the trailing stop. This is only to be done on part B if the conditions are given. Note: the ATR used in here is the one when the trade was placed, not the current. If the ATR was 100 at the beginning of the trade, and the price closes 200 above(the distance in this example to activate the trailing stop) the price entry and the ATR is 120 at the moment of this happening, ignore 120 and use the 100.
Sell example:
Stop Loss: Stop loss is set as 1.5 x ATR above the price. For instance, if ATR was 100, then the stop loss would be 150. This goes for both parts A and B
Take profit: Take profit needs to be 1 x ATR below the entry point. This only goes for part A
After taking the first profit: The trade B’s stop loss if moved to the entry point. This only goes por part B
Trailing stop: Trailing stop is activated only after the price has moved and closed 2 x ATR from the trade entry price. The trailing stop is 1.5 x ATR away from the lowest closed price. This trailing stop can be adjusted each time the price closes to a new lowest low. This is only to be done on part B if the conditions are given. Note: the ATR used in here is the one when the trade was placed, not the current. If the ATR was 100 at the beginning of the trade, and the price closes 200 below(the distance in this example to activate the trailing stop) the price entry and the ATR is 120 at the moment of this happening, ignore 120 and use the 100.
There is a guy that is developing something similar(see screenshot below), but he is still on beta testing and his costumer service was not the best. So, I am deciding to it myself with your help.
You can use all the box as a reference. My suggestion is replacing the Risk % and put there the numbers of contracts. Another suggestion of mine would be removing the "Move to BE" button as that should happen automatically in the previous instructions I gave. The rest can stay. Remember that everything should work with the information of closed candles. The only thing that should change on the fly is the movement of the stop to BE once it reaches the take profit.
Let me know if you have any questions,
Jose Rubio