Lavoro terminato
Specifiche
Below is the requirement for my expert...
Variables:
Lot size: starting from 0.001 (must requirement)
Stop Loss
Take Profit
Maximum number of losing trades
Multiple: 2
First trade direction: Buy/sell
Description
When the EA is activated, the first trade is placed by the EA based on the set variables. If the trade ends up in a profit then the next trade is again placed with the same position size and direction (long or short). And, if this trade also ends up in profit then the EA will place another trade with the same position size and direction. This will continue till EA encounter a losing trade.
Once the EA faces a losing trade, EA will place a trade in the opposite direction of previous trade and also the position size will increase to the predefined multiple in the variables. If this trade also ends up in a losing trade then EA will place the next trade in the opposite direction of the previous trade and also the position size will be a multiple of the previous trade. This will continue till the EA faces a winning trade or it reaches predetermined number of losing trades in the variables.
Example:
Variables:
Lot size: starting from 0.01 (must requirement)
Stop Loss: 20 pips
Take Profit: 20 pips
Maximum number of losing trades: 4
Multiple: 2
First trade direction: Buy/sell
Execution
Trade1: Buy, position size 1000; Result: Profit
Trade2: Buy, Position size 1000; Result: profit
Trade3: Buy, Position size 1000; Result: profit
Trade4: Buy, Position size 1000; Result: loss
Trade5: Sell (observe the change in direction after a losing trade), Position size: 2000; Result: loss
Trade6: Buy (observe the change in direction after a losing trade), Position size: 4000; Result: loss
Trade7: Sell (observe the change in direction after a losing trade), Position size: 8000; Result: loss
Trade8: Buy (observe the change in direction after a losing trade), Position size: 1000; Result: Profit
Observe that the lot size is brought back to 1000 as the “Maximum number of losing trades: 4” has reached as defined in the variables.
Important requirement - Generally MT4 does not allow the lot size less than 0.01. But my requirement is that we should be able to place trades with lot sizes as small as 0.001