Tarea técnica
Hi,
I have an EA, which places limit orders only by reading the text files in common folder (in a specific format)
I need to make some updates in the EA:
1. Limit to Market Entry Adjustment: True/False
· By default, when placing a buy limit order, if the current price, is below the limit price mentioned in the file, the order gets triggered as market entry.
· By enabling the above option as True, it will restrict the entry of that pair (not just the trade) on that pair for that candle.
Note: This EA can read 5 folders and place limit orders at 5 different levels.
So, if anyone of the trade is rejected on that candle, kindly not place any trades on that pair for that candle.
2. Reset Start Balance & Day Balance by Time: True/False
There’s an option in the EA on the chart to reset start balance and day balance, manually by clicking the button.
Instead of clicking the button:
I wanted a reset to happen at the start time of the session input:
(Asian, London, US), its already there in the input itself.
3. Closing the Trade Loop after commission deducted: True/False
a. ==== safeguard retracement setting ====
b. ==== time-based retracement exit ====
c. ==== currency level exposure control ====
These 3 workings, will close the pair trades based on its logic. While doing this, the commissions are not getting covered when traded on raw spread account.
I want 2X of the commissions to be covered while trades are getting closed in these methods.
((These closes the trades, when the cumulative value of that pair becomes 0, you need to add the cumulative value of the 2X commissions as well. And adding them both, it should become more than 0. Then only, it will be a clear exit without loss. Or else I am paying more in commissions.))
4. Trialing the trades via Zigzag Indicator: True/False
If my trades already reached breakeven.
For buy trade: SL > Entry Price; For Sell Trade: SL < Entry Price.
If this happened, we know, we are in the right side. Now, we just need to trail it as much as possible, once it hits the breakeven.
(ATR input is already there in the EA)
For Buy Trade: Trail the SL below the HL + ATR
For Sell Trade: Trial the SL above the LH + ATR
In the above buy, we would have entered the trade at the red up arrow. And the breakeven level, the trade would have entered breakeven. SL> entry Price.
Now, Zigzag Working will start, it will look for HL formations. And if HL formed, place the stoploss below to it, by adding the ATR at that time. Now, wait for the next HL formed. Repeat the process, and over the period of time, that trade will be closed, if the SL is broken.
5. Close the Trade when Structure Shifted: True/False
StructureShiftTrailStartLevel 0.06
StructureTrailNextLevel 0.125
When a buy order is placed (even if it is pending), it tracks for the zigzag formation of LH and LL or LL and LH. If any of such zigzag formed. It’s a sign that, we are in a bad trade. If the cumulative equity of that pair along with 2x of the commission, exceeds 0, better close the trade, rather than waiting for magic to happen or waiting till it hits the SL.
Check for the formations of the following:
Buy trade: LH and LL or LL and LH. (can be of any order)
Sell Trade: HL and HH or HH and HL. (can be of any order)
If the EA finds such a kind of zigzag formation, trail the equity of that pair and close the trade, print the log named:
Formation of Zigzag LH and LL found on EURUSD Buy. Waiting for the loop to be > 0.
Once the equity of that pair + 2x commission >0,
Print a log for equity trailing and close the trades.
The trailing of the equity of that pair concept remains the same as ==== safeguard retracement setting ====
I entered a sell trade on the Down Arrow. But Market forms a HH and HL, which indicates a clear buy trend, instead of waiting for the sell trade to hit, if the equity of that pair, reaches 0 along with 2x commission, better trail the equity of that pair and close the trades.
This working will be included for pending orders as well. Both running and pending orders will be deleted with this method. If the Zigzag shift happened, for a pending order, close the trade even before it is executed.
Zigzag Indicator (Repaint Solution):
The zigzag can repaint in the following manner:
1. HH – HH
2. LH – HH
3. LL – LL
4. HL – LL
In such cases, these are either the high points or low points only. The above working I said, needs a high swing and low swing indicating buy/sell
Buy: HH/HL
Sell: LH/LL
High Swings: HH/LH
Low Swings: LL/HL
We need a clear signal of structure. Not a repainted one. So, if you need to make any changes in Zigzag indicator, kindly do that, before integrating this in EA.