AFL project to find out qty to compensate for the loss of previous trades

MQL4 Experts C++ PHP Forex Product Design

Specification

Objective : to level the quantity required to compensate for the loss of previous trades evenly

initialqty=iqty=10;
profittarget=pt=.1;
stoploss==sl.1;
brokerage=.01;
profitmargin=pt-brokerage;
lossmargin=sl+brokerage;
lotsize=1000;

if trade hits stoploss
loss count should be incremented
loss should be calcualted and added to previous total loss to get the new total loss
find out the total qty required to compensate for loss.
then devide this by loss count.

totalloss=last value(loss)+(last value(qty)*lot size * loss margin)

newqty = iqty+(total loss/(profit margin*10000*loss count))

qty=newqty; this qty should be same until the loss count value becomes zero

if trade is open till 14:45
consider selling or covering the trade with the close value of last candle or open value the running candle
loss should be calcualted and added to previous total loss to get the new total loss
find out the total qty required to compensate for loss.
then devide this by loss count.
(here we are not changing the loss or profit count)

if trade hits profit while loss count >0
loss count should be decremented by 1 until loss count is equal to zero
profit count should be incremented by 1
total loss = lastvalue(total loss) - profit of the last trade

if loss count increases before reaching zero, recalculate the total loss and the new qty to compnesate.
total loss = lastvalue(total loss) - loss of the last trade

new qty = iqty+(total loss/(profit margin*10000*loss count))

when loss count reaches zero
reset below variables
total loss = 0
profit count =0
qty = iqty

profit count should be zero even if a trade hits profit unless loss count > 0

Responded

1
Developer 1
Rating
(247)
Projects
441
34%
Arbitration
57
35% / 37%
Overdue
161
37%
Busy
2
Developer 2
Rating
(65)
Projects
71
30%
Arbitration
8
0% / 88%
Overdue
5
7%
Free
Similar orders
Hi, Developer Scalping ea is required in mql5 for JPY currency pairs(usdjpy, audjpy,gbpjpy,cadjpy) and USD currency pairs (audUSD,EURUSD, gbpUSD, NZDUSD, USDcad, USDCHF, xauusd). Scalping ea should be profitable. Trailing stop may be required Please help on this. Note: developer should complete more than 100 projects
It is using EMA/SMA for triggers of long or short (green long/red short) and the line above or below is the stop loss, profit triggers would need to figure out or allow it until next trigger. Already in thinkscript And add parameters
Objects reader PIN 70 - 100 USD
Hi I have an indicator that create objects in the chart and using those following some rules the new indicator will create external global variables with value = 0 ( NONE ), = 1 ( BUY ) or = 2 ( SELL ). The global variable will use PIN external integer number . PINS are by now global variables (GV) whose name indicates the pair name and the PIN belonging and their value indicates it direction/action. PINS GV names
Hi, I need modification of my EA to meet all prop firm rules. An expert developer is needed. Developer must have enough experience on prop firm because I don't have all the details of prop firm rules
Saleh taher 30+ USD
Hi, am facing problem when I try to open live trading account with brokers , you gave me the (login) and password, but the login should be numbers and you gave me Letters and numbers it's not working, I just have demo account please help me to have live account
Hello, I want offline Renko chart based on pips and time. Trading View Renko chart is a perfect example of what I require, it prints renko bricks at close of time frame chosen which is more cleaner. The Trading View Renko chart wait until end of desired timeframe candle to close before final renko bricks are drawn. Best is to look at Trading View renko charts to see exactly how this works. I currently have an
Check if you understand my explanation crypto bot or make it mt5 bot Once it opens buy and move positively to buy let it use auto trailing to follow the trend and if it opens buy and move negatively let it martingale I will choose the amount it will open with example I can set it to open with $1 In martingale I can set it on fix that’s any martingale position will still be $1 if I choose fix then it will martingale
Martingale Strategy EA 50 - 300 USD
Dear , I hope this message finds you well. I would like to request the development of a trading robot (Expert Advisor) that incorporates the following strategies and features: Strategy Requirements: 1. Martingale Strategy: The robot should include a Martingale system to increase trade sizes after losses in order to recover losses and generate profit. 2. Trend-Following: It should also be able to detect and follow
Hi, Scalping ea is required in mql5 for JPY currency pairs(usdjpy, audjpy,gbpjpy,cadjpy) and USD currency pairs (audUSD,EURUSD, gbpUSD, NZDUSD, USDcad, USDCHF, xauusd). Scalping ea should be profitable. Please help on this
I'm seeking a Forex HFT Scalping EA that operates on live streaming tick data and candlestick patterns, executing a high frequency of trades without balance restrictions. The EA should be compatible with major currency pairs like EUR/USD, GBP/USD, USD/JPY, AUD/USD, GBP/JPY, GBP/AUD, and XAU/USD, as well as US30 indices. Given its HFT nature, it should focus on the 1-minute, 5-minute, 15-minute, and 30-minute

Project information

Budget
40+ USD
VAT (21%): 8.4 USD
Total: 48.4 USD
For the developer
36 USD
Deadline
from 1 to 5 day(s)