i tried half day....i cant solve this...please help

 

Hi Pros,


i confused at function - AdjustBuyProfit

its a grid trading system ,

i was thinking to find 3 profit trade that bigger than the biggest lost trade , close it together .

its was fine when number of trade it less , but when its many trade . 

it get confused.

Files:
 

Do you know that there are plenty of grid trading system available, running without any error: https://www.mql5.com/en/search#!keyword=grid%20ea&module=mql5_module_codebase

(until it will have ruined your account).

Take one of those and change it according to your ideas.

 
Lim Boon Keng: its a grid trading system ,

Hedging, grid trading, same as Martingale.
          Martingale, Hedging and Grid : MHG - General - MQL5 programming forum (2016)

Martingale, guaranteed to blow your account eventually. If your strategy is not profitable without, it is definitely not profitable with.
          Martingale vs. Non Martingale (Simplified RoR vs Profit and the Illusions) - MQL5 programming forum (2015)

Why it won't work:
          Calculate Loss from Lot Pips - MQL5 programming forum (2017)
          THIS Trading Strategy is a LIE... I took 100,000 TRADES with the Martingale Strategy - YouTube (2020)