Total monetary risk piece of code

MQL4 Esperti Script

Specifiche

* A function, which I could add to start() or ontick() of any EA that would give a Comment() which lists;

   - The total monetary risk of the account based on open positions

   - Should work with any pair, any broker, any number of digits

   - If even one position has no SL, the risk is unlimited.

   - If there are one or more positions, and all have a SL, then it should calculate the max risk based on number of lots/microlots etc. open given the stoploss values.

   - If certain positions offset each other in risk (for example, 0.10 lots up, 0.05 down on the same pair)

   - The calculation should be per-MT4-account, irrespective of what EA the code is attached to

   - The calculation should return a single result in USD$

Example:

Comment ("The maximum risk of the 4 current open positions (0.23 lots) is $403.44 USD, if all stoplosses were hit simultaneously.");

Where 4, 0.23 and 403.44 are variables.


There should also be an offset switch. Two examples for off/on of this switch:

USDJPY 0.10 long + 0.05 short. SL is set at $10 for first position, at $5 for second.

setting: offset=0: SL1 $10 + SL2 $5 = $15 risk (this maximum risk could only be triggered if price went up/down enough to hit both stoplosses)

setting: offset=1: SL1 $10 - $SL2 $5 (since there are two positions on the same pair) = $5 more realistic risk

Thanks

Con risposta

1
Sviluppatore 1
Valutazioni
(4)
Progetti
7
43%
Arbitraggio
5
0% / 60%
In ritardo
3
43%
Gratuito
2
Sviluppatore 2
Valutazioni
(20)
Progetti
43
30%
Arbitraggio
6
0% / 50%
In ritardo
17
40%
Gratuito
3
Sviluppatore 3
Valutazioni
(30)
Progetti
93
49%
Arbitraggio
18
56% / 17%
In ritardo
38
41%
Gratuito
4
Sviluppatore 4
Valutazioni
(62)
Progetti
140
46%
Arbitraggio
19
42% / 16%
In ritardo
32
23%
Gratuito
Ordini simili
Hello, I would like you to help me develop a simple Expert Advisor (EA) for trading the Boom and Crash markets. All the project requirements is available with me . kindly bid if you can develop EA for boom and out crash . Thanks
Hello, I am looking for an programmer to convert a TradingView strategy pine script to MT5 EA auto trade bot. The indicator is based on the FVG/Imbalance (Pine script will be provided) The MT5 EA must return 100% the same results as TradingView script The MT5 EA must include the same options as TradingView The MT5 EA must be errors free
Project Overview: We are seeking an experienced developer to create a custom Copy Trading Expert Advisor (EA) that supports two-way communication between MetaTrader 4 (MT4), MetaTrader 5 (MT5), and cTrader trading terminals. The EA should enable seamless copying of trades from one account to another, incorporating additional settings for flexibility and customization. The project will involve developing a DLL
I am currently seeking the expertise of a skilled MQL5 developer to assist with a custom trading bot project tailored to specific requirements. The project entails the development of a versatile trading bot capable of implementing both manual and automated strategies, with flexibility to switch between strategies seamlessly. Additionally, the bot should be designed to convert profits automatically into USDT, allowing
PRESQUE PAREIL QUE L’AUTRE ROBOT AVEC QUELQUE PETIT CHANGEMENT. IL N’Y AURA PLUS DE SL; SI TU PEUX M’ENVOYER TON MAIL, JE T’ENVOIE LE DOCUMENT QUI EXPLIQUE LE MODELES DU ROBOT QUE JE VEUX. @page { size: 8.27in 11.69in; margin: 0.79in } p { line-height: 115%; margin-bottom: 0.1in; background: transparent }
Mt4 EA 30+ USD
Would it be possible to get a reasonable quote for an MT4 EA with multiple trade entry criteria. With the help of chatgpt I've got a code that compiles without errors or warnings that I have attached in a zip file, it is simply not taking valid trade signals. Not sure if it's of any use to you or if it's better to start from scratch. talk soon
I would like a Forex trading robot for MT5. The market entry signal is based on a TradingView Indicator (I will provide the name of which one), and the robot should execute Buy or Sell trades based on the Buy/Sell alerts that this indicator provides. The TradingView Pine Script is open source, so it will be available for you to see. Closing of positions is done by the SL, TP. The lot size is calculated as a
I trade in future indices of a Brazilian brokerage via MT5 and would like to import the data of another future index (djia future - which does not exist at the brokerage where I operate) into a new window, showing its price and volume variations in the shortest possible time. This new Symbol should also have the capability to be displayed in candlestick mode and adjustments in its timeframe. I will use an indicator
I have an EA with the sourse code but instead of using an FX blue copier to invert the trades i want the EA to reverse its Strategy. For example if the EA wants to buy it will sell. And the stop loss and take profit will be inverted also
Hi I'm looking for a developer who can improve on an existing basic EA that isn't quite working correctly due to a lack of comprehension from the previous coder on the logic. It's a hedging system that trades in the opposite direction to a bad entry by entering every x pips until the average of all the bad trades and the good trades are in profit. It then closes all of them at the same point which is in profit by x

Informazioni sul progetto

Budget