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.

Техническое задание

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  

Файлы:

PNG
lotsize_.PNG
30.5 Kb

Откликнулись

1
Разработчик 1
Оценка
(108)
Проекты
122
20%
Арбитраж
5
0% / 60%
Просрочено
2
2%
Занят
2
Разработчик 2
Оценка
(184)
Проекты
188
27%
Арбитраж
0
Просрочено
3
2%
Свободен
3
Разработчик 3
Оценка
(51)
Проекты
70
43%
Арбитраж
21
14% / 67%
Просрочено
8
11%
Свободен
4
Разработчик 4
Оценка
(8)
Проекты
10
0%
Арбитраж
3
33% / 33%
Просрочено
0
Занят
5
Разработчик 5
Оценка
Проекты
0
0%
Арбитраж
0
Просрочено
0
Свободен
6
Разработчик 6
Оценка
(66)
Проекты
143
34%
Арбитраж
10
10% / 60%
Просрочено
26
18%
Работает
Похожие заказы
Hello .I have existing Tradingview strategy that I will like to automate to Mt4 EA based on my specification . I need an expert in the field that have experience in both tradingview and MT4
I want a developer who is an expert in deriv https://youtu.be/2euVfXYkrmE?feature=shared&nbsp;DIGIT MATCH bot I want a profitable robot I want a developer to do this task for me I want a developer who has experience in this
I Want someone who can Create a Mobile EA Automatic Trading Bot system with My kind of trading style (BTMM) Beat The makert maker,which includes a bit of mixed strategies such as Smart money concept(SMC) and Market Maker Cycle(MMC),The Bot must be Able to Take short and long term trades only after Rejections/confirmations not when it's going against(to minimize/avoid blowing small Accounts),it must place Stoploss and
my style of trade is to manually scale position size up & down from 1 to 100+ micros as the market moves, so the indicator I need has nothing to do with scaling in & out of the position, but I need an indicator that dynamically trails the position P&L, And has a trailing daily max loss that will reject new order entry if triggered. Example is setting a $350 Position auto stop-loss so as I scale in & out of contracts
I accidentally deleted the order, so I apologize to the developer with whom I started the order. If you can, contact me to continue the order.And I would like to thank the others for responding to the offer. I wish you all success in your work
Hey there, I need to convert an indicator from ninja to mt4 I will attach the ninjatrader indicator script to be converted into mt4 If you can do this kindly bid and let's discuss about the project Thanks
Hi, I need to add a module to existing EA to enalbe it to buy and sell baskest of stocks and indicies. What I need: - synthetic chart in MT5 of e.g. combination of 2 long stocks and 5 shorted stocks. I need to be able to easily create new charts of the mixes of stocks / indicies. - matrix / panel of the chosen stocks' CFDs which tickers one will choose from the Symbol list (at particular broker symbol list) - adding
In search of a dev who can develop an EA that executes buys on Boom and sells on Crash after a Spike. Need to be able to specify TP and SL
Please I need a profitable EA with any of the following criteria; Hedge Trading Hedging trades is permitted however, hedging separate accounts against each other (known as Wash Trading) is not permitted and is a direct violation of the OnlyFunds’ Terms and Conditions. Wash trading is illegal and considered to be fraudulent, as it undermines the integrity of financial markets. Swing Trading Swing trading is
Looking for a developer of profitable EA tested for over 2 or more years time history of profits with investors read me only access as proof of usage. MT4 or MT5

Информация о проекте

Бюджет
30 - 50 USD
Исполнителю
27 - 45 USD