Modify and debug EA functions that scans and for slpoints that will produce lotsize that is neither greater or less than the max& min lotsize for Deriv Synthetic indices.

Spezifikation

Below  i have placed a the failed  attempt  to make functions code in mql5 the system should 
double input  riskPercent=20.0;                                              

void OnTick()
  {
//---
ScanSLPoints();
   
  }
//+------------------------------------------------------------------+
double Calculate_lotsize(double Riskpercent,double slDistance)
  {
   double ticksize=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_SIZE);
   double tickvalue=SymbolInfoDouble(_Symbol,SYMBOL_TRADE_TICK_VALUE);
   double lotstep =SymbolInfoDouble(_Symbol,SYMBOL_VOLUME_STEP);
  // Print(ticksize,"ticksize ", tickvalue," tickvalue ",lotstep,"lotstep");
   if(ticksize==0 || tickvalue==0 || lotstep==0)
     {
      Print(__FUNCTION__,"< Lotsize cannot be calculated....");
      return 0;
     }
     
   double riskMoney =AccountInfoDouble(ACCOUNT_EQUITY)*Riskpercent/100;
   double Moneylotstep=(slDistance/ticksize)*tickvalue*lotstep;
   if(Moneylotstep==0)
     {
      Print(__FUNCTION__,"< Moneylotstep cannot be calculated....");
      return 0;
     }
   double lots =MathFloor(riskMoney/Moneylotstep)*lotstep;
Comment("riskmoney ",riskMoney,"Moneytobelost",Moneylotstep);
   return lots;
  }


void ScanSLPoints() {
    double minLot = SymbolInfoDouble(Symbol(), SYMBOL_VOLUME_MIN);
    double maxLot = SymbolInfoDouble(Symbol(), SYMBOL_VOLUME_MAX);
    double balance = AccountInfoDouble(ACCOUNT_BALANCE);
    double askPrice = SymbolInfoDouble(Symbol(), SYMBOL_ASK);

    for (double slPoints = 1.0; slPoints <= askPrice; slPoints += Point()) {
        double lotSize = Calculate_lotsize(riskPercent, askPrice - slPoints);
        if (lotSize >= minLot && lotSize <= maxLot) {
            Print("SL Points: ", slPoints, " Lot Size: ", lotSize);
        }
    }
}
the code above should show and  display  
Print("SL Points: ", slPoints, " Lot Size: ", lotSize);

the slpoints  should produce an equivalent lotsize which should always be in the range of max_lot and minlot for a certain balance so with every change in balance it should recalculate the slpoints and i must be  able to select a desired lotsize so that means the data can be stored in an external file so the system or functions should be run whenever there is a signal  because  of the dynamic price structue of boom and i have experienced runtime errors  as shown in lotsize.png  

Dateien:

PNG
lotsize_.PNG
30.5 Kb

Bewerbungen

1
Entwickler 1
Bewertung
(108)
Projekte
122
20%
Schlichtung
5
0% / 60%
Frist nicht eingehalten
2
2%
Überlastet
2
Entwickler 2
Bewertung
(184)
Projekte
188
27%
Schlichtung
0
Frist nicht eingehalten
3
2%
Frei
3
Entwickler 3
Bewertung
(51)
Projekte
70
43%
Schlichtung
21
14% / 67%
Frist nicht eingehalten
8
11%
Frei
4
Entwickler 4
Bewertung
(8)
Projekte
10
0%
Schlichtung
3
33% / 33%
Frist nicht eingehalten
0
Überlastet
5
Entwickler 5
Bewertung
Projekte
0
0%
Schlichtung
0
Frist nicht eingehalten
0
Frei
6
Entwickler 6
Bewertung
(66)
Projekte
143
34%
Schlichtung
10
10% / 60%
Frist nicht eingehalten
26
18%
Arbeitet
Ähnliche Aufträge
I'm looking for a Filipino coder for my EA. Current code is about 3k lines uses custom logic. Need someone full time to help me fix it. My current is having entry issues and logic issues and needs some quick attention
Hi, I have one indicator for MT4 and it is working fine as I need. Now I want to convert it into MT5 version. The basic idea is that I put a starting date in one box, symbol in second box, number of lots in 3 box, per point value in 4th box. Indicator generate a virtual equity from starting minute till current date and time and shows it in 5th box and before this, it shows the starting price also, which I set by date
hey, I would like to order EA as per specifications. Using two indicators - Bollinger Bands and MA. Opening subsequent positions in a given size (with a specific SL and TP) after a loss in accordance with the assumptions. Additionally, I need a descriptive dashboard on a chart
Modification of an ea 30 - 45 USD
1. Programming language: Python 2. Platforms: MT4 and MT5 3. Indicators: - MACD (24, 52, 9) - RSI (15, 85) - VWAP 4. Trading logic: - Buy signal: MACD crossover below neutral line, RSI oversold, bullish candle above VWAP - Sell signal: MACD crossover above neutral line, RSI overbought, bearish candle below VWAP - Open buy and close sell, or open sell and close buy simultaneously 5. Additional features
Hi, I am not sure if I could describe what I want but it is almost exactly the same as in job here, only on EURUSD pair : https://www.mql5.com/en/job/206055. Bot would be used on Metatrader 4, running 24/7. Bot: My goal is to create bot for "20 pip challenge" on EURUSD pair. I would like to be able to configure bot parameters like x-pip stop loss, and x-pip take profit using some settings window, default values
Greetings Programmers. I am looking for someone who can fix three issues on my EA. Please do not apply if you are currently working on another project. I need someone who is available and can start immediately. Everything already exist it needs to be better and when trades are open it must close the trades when opposite signal are provided. Buy above the Horizontal Line and Sell below the Horizontal Line
I have one boot , but i need to modify some things . EA has 4 indicators and entry method , i want to remove 3 of them and leave just 1 indicator and his method of entry based in this indicator , then add one moving avarage filter for signals to this
I am in search of a skilled MQL5 developer with a proven ability to optimize trading robots across various assets, including synthetic indices like V75, Boom and Crash, gold, US30, US100, and more. I'm looking for an experienced developer to enhance my multi-asset trading EA, which was originally developed exclusively for V75 and is based on the smart money concept. This comprehensive EA, based on an market indicator
Seeking an experienced dev to develop an EA for Boom and Crash based on a moving average crossover. Once order is placed a Trail SL should follow. Dev should be able to add to the strategy/optimize it. I have an EA you can look at as a guideline
Fractals Hedge Master 50 - 90 USD
I need a very simple EA which: 1- Should work on three indicators (Moving Average, Parabolic SAR, MACD and Fractals). The option to turn on/ off for these indicators should be available for the trader as per his strategy. Of course, if the trader wants to turn on one/ two/ three indicators, further options to determine the type/ values (I.e Parameter) should be asked by the EA. 2- The system works on top/

Projektdetails

Budget
30 - 50 USD
Für die Entwickler
27 - 45 USD