Help debug my custom currency strength meter based on my own algo

Tâche terminée

Temps d'exécution 4 jours
Commentaires de l'employé
wonderful client.. thank you for this.
Commentaires du client
Cleaned up my buggy indicator nicely.

Spécifications

So as the title suggest, I am looking for someone to debug and briefly explain my errors in my code.

The indicator looks like this on the chart

There are 4 bugs to fix

  1. Indicator applies to the chart fine but doesn't seem to run after initialization.
  2. Indicator only works on 1 hour charts and higher.
  3. Indicator "freezes" on start on new period.
  4. Graphic panel doesn't update to represent indicator value.

Examples of coding include the following

  • Custom strength algo 

   int   i,pos;

////---
   if(rates_total<=1)
      return(0);

////--- preliminary calculation
   if(prev_calculated>1) pos=prev_calculated-1;
   else  pos=1;

   for(i=pos-1; i<rates_total; i++)
     {double eg = 50 + (((iClose("EURGBP",0,i)-iClose("EURGBP",0,(i+Delta)))/(iHigh("EURGBP",0,(iHighest("EURGBP",0,MODE_HIGH,Delta,i)))-iLow("EURGBP",0,(iLowest("EURGBP",0,MODE_LOW,Delta,i)))))*100)/2;
      double ea = 50 + (((iClose("EURAUD",0,i)-iClose("EURAUD",0,(i+Delta)))/(iHigh("EURAUD",0,(iHighest("EURAUD",0,MODE_HIGH,Delta,i)))-iLow("EURAUD",0,(iLowest("EURAUD",0,MODE_LOW,Delta,i)))))*100)/2;
      double en = 50 + (((iClose("EURNZD",0,i)-iClose("EURNZD",0,(i+Delta)))/(iHigh("EURNZD",0,(iHighest("EURNZD",0,MODE_HIGH,Delta,i)))-iLow("EURNZD",0,(iLowest("EURNZD",0,MODE_LOW,Delta,i)))))*100)/2;
      double eu = 50 + (((iClose("EURUSD",0,i)-iClose("EURUSD",0,(i+Delta)))/(iHigh("EURUSD",0,(iHighest("EURUSD",0,MODE_HIGH,Delta,i)))-iLow("EURUSD",0,(iLowest("EURUSD",0,MODE_LOW,Delta,i)))))*100)/2;
      double ec = 50 + (((iClose("EURCAD",0,i)-iClose("EURCAD",0,(i+Delta)))/(iHigh("EURCAD",0,(iHighest("EURCAD",0,MODE_HIGH,Delta,i)))-iLow("EURCAD",0,(iLowest("EURCAD",0,MODE_LOW,Delta,i)))))*100)/2;
      double eh = 50 + (((iClose("EURCHF",0,i)-iClose("EURCHF",0,(i+Delta)))/(iHigh("EURCHF",0,(iHighest("EURGBP",0,MODE_HIGH,Delta,i)))-iLow("EURCHF",0,(iLowest("EURCHF",0,MODE_LOW,Delta,i)))))*100)/2;
      double ej = 50 + (((iClose("EURJPY",0,i)-iClose("EURJPY",0,(i+Delta)))/(iHigh("EURJPY",0,(iHighest("EURJPY",0,MODE_HIGH,Delta,i)))-iLow("EURJPY",0,(iLowest("EURJPY",0,MODE_LOW,Delta,i)))))*100)/2;



      EURBuffer[i] = (eg+ea+en+eu+ec+eh+ej)/7;

//--- and so

  • graphic panel 

//+------------------------------------------------------------------+
//|  Create Panel                                                    |
//+------------------------------------------------------------------+
void CreatePanel()
//+------------------------------------------------------------------+
  {
   string name="label_";

   for(int i=1;i<=24; i++)
     {
      string labelname=name+IntegerToString(i,3,'0');

      switch(i)
        {
         case   1:
            createBarGraph(labelname,264,43,30,2);
            break;
         case   2:
            createBarGraph(labelname,232,43,30,2);
            break;
         case   3:
            createBarGraph(labelname,200,43,30,2);
            break;
   //--- and so on     
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|  create Bar Graph                                                |
//+------------------------------------------------------------------+
void createBarGraph(string lname,int xdistance,int ydistance,int xsize,int ysize)
//+------------------------------------------------------------------+
  {
   int ypoint=ydistance;
   string name=lname+"_";

   for(int num=51; num>=1; num--)
     {
      createRectangleLabel(name+IntegerToString(num,2,'0'),xdistance,ypoint,xsize,ysize);
      ypoint+=2;
     }
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|  Create Rectangle Label                                          |
//+------------------------------------------------------------------+
void createRectangleLabel(string name,int xdist,int ydist,int xsize,int ysize,)
  {
   ObjectCreate(name,OBJ_RECTANGLE_LABEL,0,0,0);
   //--- and so on
  }
//+------------------------------------------------------------------+

//+------------------------------------------------------------------+
//|  Create Edit                                                     |
//+------------------------------------------------------------------+
void createEdit(string name,int xdist,int ydist,int xsize,int ysize,string text,int fontsize,color clr)
//+------------------------------------------------------------------+
  {
   ObjectCreate(name,OBJ_EDIT,0,0,0);
   //--- and so on
  }
//+------------------------------------------------------------------+

  • graphic panel update 

      objectSetBlank("label_001");
      objectSetGraph("label_001_",EURBuffer[0],C'128,128,128',C'134,121,121',C'140,115,115',C'147,108,108',C'153,102,102',C'159,96,96',C'166,89,89',C'172,83,83',C'179,77,77',C'185,70,70',C'191,64,64',C'198,57,57',C'204,51,51',C'210,45,45',C'217,38,38',C'223,32,32',C'230,25,25',C'236,19,19',C'242,13,13',C'249,6,6',C'255,0,0');
      ObjectSetString(0,"label_017",OBJPROP_TEXT,DoubleToString(EURBuffer[0],0));

  • Set graph 

//+------------------------------------------------------------------+
//|  object Set Graph                                                |
//+------------------------------------------------------------------+
void objectSetGraph(string name,double value,color a,color b,color c,color d,color e,color f,color g,color h,color i,color j,color k,color l,color m,color n,color o,color p,color q,color r,color s,color t,color u)
  {
//---
   ObjectSet(name+"51",OBJPROP_COLOR,a);
   if(value > 2.0) ObjectSet(name + "50", OBJPROP_COLOR, a);
   if(value > 4.0) ObjectSet(name + "49", OBJPROP_COLOR, b);
   if(value > 6.0) ObjectSet(name + "48", OBJPROP_COLOR, b);
   if(value > 8.0) ObjectSet(name + "47", OBJPROP_COLOR, c);
   if(value > 10.0) ObjectSet(name + "46", OBJPROP_COLOR, c);
   if(value > 12.0) ObjectSet(name + "45", OBJPROP_COLOR, d);
   if(value > 14.0) ObjectSet(name + "44", OBJPROP_COLOR, d);
   if(value > 16.0) ObjectSet(name + "43", OBJPROP_COLOR, e);
   if(value > 18.0) ObjectSet(name + "42", OBJPROP_COLOR, e);
   if(value > 20.0) ObjectSet(name + "41", OBJPROP_COLOR, f);
   if(value > 22.0) ObjectSet(name + "40", OBJPROP_COLOR, f);

//--- and so on

The full code is 440 lines and will be provided upon expression of interest.

Thank you for your time

Bob

Répondu

1
Développeur 1
Évaluation
(362)
Projets
506
40%
Arbitrage
147
18% / 72%
En retard
99
20%
Chargé
2
Développeur 2
Évaluation
(130)
Projets
210
40%
Arbitrage
90
20% / 43%
En retard
85
40%
Gratuit
3
Développeur 3
Évaluation
(468)
Projets
703
56%
Arbitrage
45
29% / 31%
En retard
115
16%
Travail
4
Développeur 4
Évaluation
(69)
Projets
93
34%
Arbitrage
10
40% / 30%
En retard
5
5%
Gratuit
Commandes similaires
EA based on RSI and MA 100 - 400 USD
Program is based on RSI and MA indicators dynamic as triggers, for Open/Close criteria. Runs automatically but inputs can be updated manually. It uses a GUI to manage it. Multi TF analysis. Log register of every operation for analysis (db) Open Source deliver. Kindly apply IF you have previous experience with trading and mql/python/c bot/algo developing. And if you have a good track record . ps: Better if you have a
dreams good and have a great Cash out from your smart phone , tuyoywuiy glamorous flood see full idk idk slow so dolls stupid sis workouts who's spark koalas oral waits also doggo idk
NRTR - indicator for MetaTrader 5 NRTR (Nick Rypock Trailing Reverse) - indicator for MetaTrader 4 NRTR WATR - indicator for MetaTrader 4 NRTR GATOR - indicator for MetaTrader 5 X2MA NRTR - indicator for MetaTrader 5 NRTR - indicator for MetaTrader 5 NRTR GATOR - indicator for MetaTrader 4 NRTR - indicator for MetaTrader 4 Stalin_NRTR - indicator for MetaTrader 5 NRTR Color Line - indicator for MetaTrader 5 NRTR Rosh
Hello, I want offline Renko chart based on pips and time. Trading View Renko chart is a perfect example of what I require, it prints renko bricks at close of time frame chosen which is more cleaner. The Trading View Renko chart wait until end of desired timeframe candle to close before final renko bricks are drawn. Best is to look at Trading View renko charts to see exactly how this works. I currently have an
Martingale Strategy EA 50 - 300 USD
Dear , I hope this message finds you well. I would like to request the development of a trading robot (Expert Advisor) that incorporates the following strategies and features: Strategy Requirements: 1. Martingale Strategy: The robot should include a Martingale system to increase trade sizes after losses in order to recover losses and generate profit. 2. Trend-Following: It should also be able to detect and follow
My requirements are the following. I am ordering, I need an expert consultant on EA matters and an indicator in the trade pairs of XAUUSD and XAGUSD, we also need powerful robots for changing prices in the market. the market conditions, i.e. flexibility, then the business should be beneficial for all I need high and low line python line position to work thank you
QuantumTrader 30 - 200 USD
Request for development of machine learning robots for MetaTrader 5 (MT5) **Description**: Willing to develop experience in programming trading robots using MQL5 language and can learn machine learning on MetaTrader 5 (MT5) platform. The robot should be able to implement a multidisciplinary strategy on a set of technical indicators and multiple rules. I need to develop the robots so that they can work in an
The goal is to develop a system that mirrors trade actions (Buy/Sell) from a CTrader demo account on Cronos Markets to multiple prop firm accounts on TradeLocker, ensuring accurate replication of trades while adjusting risk proportionally. I was wondering if you could help me with copy trading an EA’s action on Cronos markets (uses CTrader) into a prop firm account that I bought with TooOne Trader (uses TradeLocker
I would like to create an Expert Advisor (for MT5) for personal use to manage positions. The utilities will be inspired by the tool below: https://www.mql5.com/en/market/product/23415?source=Site+Market+MT5+Utility+Rating006#description I think the number of options will be smaller, but I am very interested in the following functionality: 1. The ability to read the last highest price (pick) for short positions –
Hi there, I am offering $30 usd for someone to convert four pictures I have to metatrader icons(arrows) that I can use in both MT4 & MT5. We all know that we can change arrows on the chart by using a different arrow code, but the arrows in metatrader are boring and I want to use custom ones. I want the four attached pictures as icons that i can use with indicators that give the option to choose your arrow type. I

Informations sur le projet

Budget
30+ USD
Pour le développeur
27 USD