Coding a value TargetProfit on Breakeven indicator

 
Hello all,

This indicator is based on the average Price v3.0.mq4 by Joca - nc32007a@gmail.com

http://www.mql5.com . It shows the "BreakEven" line on the chart.


I have updated it with the insertion of Multiple MagicNumbers and the cumulative (between them) BE line level.

I am here to ask if someone is able to insert a code that defines a TargetProfit desired and moves the "BreakEven" line to the new target/profit level




Thanks in advance

Greetings

Lorenzo
Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • 2022.10.18
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
 

Forum on trading, automated trading systems and testing trading strategies

Looking for indicator that gives the info tp of the globality of open trades please

Fernando Carreiro, 2022.10.12 16:05

No such indicator exists as far as I known. It will have to be coded (use the Freelance section), but it will be easier to just have your existing EA be modified to show that target on the chart using the following maths:

How to Calculate the Net Resulting Equivalent Order
    • vi = volume of individual position
    • oi = open price of individual position
    • ci = close price of individual position
    • Vn = total volume for a basket of positions
    • On = net mean open price for a basket of positions
    • Cn = net mean close price for a basket of positions
    • PLn = profit/loss for a basket of positions