Specification
Hello,
Below are the parameters I want this EA to have.
This is a grid EA that has an overall stop level and profit level.
I want to be able to enter a magic number of my choice, comment of my choice for the initial original trade.
The original trade should be based on if a candle closes above or below the moving average./
the ea will place a buy
trade when a bullish candle has its open above the moving average specified.
The minimum distance parameter is the distance between which original entries of same direction cannot be placed. so the ea should place
new trades if the distance between the initial trade and the current new entry signal is equal or more than the period specified. this
applies only to trades within the same direction. example, if the ea is already in a buy trade and a new bullish candle closes above the ma,
then the ea should first check if the distance between the initial and the current entry is equal or more than the minimum distance, if it
is more, then the new trade should be placed. if not, then the ea should not enter this trade.if new signal is a sell trade, then ea should
not check for the minimum distance. it should just place the trade.
the start hour is the time at which the ea should start working. eg. if time is 1:02, then ea should only start placing new trades when this
time is up. this time parameter does not apply to trades that are not placed due to entry parameter. Only new entries should
consider the time parameter.
Same applies to end hour. this should be the time that new original trades will not be placed.
Lot size should be the lot in placing the original trade. stoploss and take profit should be in the format of a pippette. that is, 100=10pips.
Number of trades stand for the number of trades placed when entry signal is met. eg. if a bullish candle has its open above the ma, if this parameter is 0, then no trade will be placed, if it is 5, only 5 trades will be placed, if 1, then only 1 trade.\
max trades stands for the maximum number of original trades allowed to run onthe chart. so if this is 0, then as many as possible trades can run, ,meaning that, the ea will place a trade each time entry signal is met and distance between orders is greater or equal to min distance.
ma period is the period of moving average used. method can be exponential, simple, smoothed, etc. price can be close, open, etc.
profit to close is the profit at which running trades placed by the ea will be closed. so if the parameter states 25, then the ea will close all trades, both pending and runnimg that were placed by the ea. this applies to only trades placed by the ea on the current pair and not all the trad3es running on the account. 0 means that the ea will not close any trade until tp or sl is hit.
lossto close is the loss at which running trades placed by the ea will be closed. so if the parameter states 25, then the ea will close all trades, both pending and runnimg that were placed by the ea. this applies to only trades placed by the ea on the current pair and not all the trad3es running on the account. 0 means that the ea will not close any trade until tp or sl is hit.
type of trade. this means that if selectionis buy, then ea will place only trades that meet the buy rule, same for sell. but if all is selected, then ea will place both trades. all this still takes into consideration the minimum distance, max trades and number of trades.
the menu is to show on the screen the total trades running, the profit/loss running and total lots on the trade.
If number of trades is more than 1, then the level/step pending trades will also be of same number as original but profit will be calculated together
The trades will use same price levels for take profit and stoploss. So if original trade sl is at 1.0022, then the subsequent ones will have same price as sl same applies to take profit too
The Trade Comment is the comment the EA will see on a specific trade for the pending orders to be placed. (This can be removed if you think the EA can work without seeing the comment)
The steps are the number of trades the EA will place after each previous one is set. So if Steps end at 2,
it
means that EA will only place the first trade after the original trade comment is seen, then when the first
pending order is triggered, the ea
will place another pending order as the second step. After that one is
triggered, no other pending order will be placed again. The EA will use
pending orders for this if the use pending order parameter is on. It will use market orders if that parameter
is off.
The comment is the comment the pending order will have. (This should be at your decision if it is needed)
The lotX is the multiplier lot of the original trade. So if original trade is 0.03 and step5 multiplier is 7, then
the lotsize for the step5
is 0.03x7 which is 0.21 so 0.21 is going to be the pending/market order lot of step5 trade.
Step 5 is the 5th trade placed after original
trade has been placed.
The distance is the space/pip between the entry price of the original and the pending price of the pending/market step orders
so if step 1 trade is triggered, step 2 distance is the distance from the entry price of step1 to the pending order
price of step2
So all eas will work together. The moving average parameter is to place a buy or sell. so that will be used for the original trades.
Here, the
EA places a buy whenever a bullish candle closes above the MA period stated.
Then a pending order is immediately set at the distance specified. It can use a market order when price moves against the orginal trade and
reaches that distance specified.
That is if pending order parameter is off.
All along, the profit to close and loss to close will also be looking at the total/buy/sell trades of that pair to see if it has reached the loss/profit to close so as to close all trades.
Let me know what you think.