fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. danerius
    D
    • Profile
    • Following 0
    • Followers 0
    • Topics 18
    • Posts 64
    • Best 0
    • Controversial 0
    • Groups 0

    danerius

    @danerius

    0
    Reputation
    1258
    Profile views
    64
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    danerius Unfollow Follow

    Latest posts made by danerius

    • RE: Reverse Engineer the math for an Indicator

      I extracted the code. Here goes:

      //+------------------------------------------------------------------+
      //|                                                     Renko_v1.mq4 |
      //|                           Copyright © 2005, TrendLaboratory Ltd. |
      //|                                       E-mail: igorad2004@list.ru |
      //|                                            Many Thanks To Konkop |
      //+------------------------------------------------------------------+
      #property copyright "Copyright © 2005, TrendLaboratory Ltd."
      #property link      "E-mail: igorad2004@list.ru"
      
      #property indicator_chart_window
      #property indicator_buffers 2
      #property indicator_color1 Aqua
      #property indicator_color2 Magenta
      //---- input parameters
      extern int PeriodATR=10;
      extern double Katr=1.00;
      //---- indicator buffers
      double UpBuffer[];
      double DnBuffer[];
      //+------------------------------------------------------------------+
      //| Custom indicator initialization function                         |
      //+------------------------------------------------------------------+
        int init()
        {
         string short_name;
      //---- indicator line
         SetIndexStyle(0,DRAW_LINE);
         SetIndexStyle(1,DRAW_LINE);
         SetIndexBuffer(0,UpBuffer);
         SetIndexBuffer(1,DnBuffer);
         IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));
      //---- name for DataWindow and indicator subwindow label
         short_name="Renko("+PeriodATR+","+Katr+")";
         IndicatorShortName(short_name);
         SetIndexLabel(0,"Renko");
      //----
         SetIndexDrawBegin(0,PeriodATR);
      //----
         return(0);
        }
      
      //+------------------------------------------------------------------+
      //| Renko_v1                                                        |
      //+------------------------------------------------------------------+
      int start()
        {
         int i,shift;
         double Up,Dn,Brick,AvgRange,dK,ATR,BrickUp,BrickDn;
      	
         for (shift=Bars-1-PeriodATR;shift>=0;shift--)
         {	
      	AvgRange=0;
      	for (i=PeriodATR-1;i>=0;i--)
      	{ 
                      dK = 1;
                      AvgRange+=dK*MathAbs(High[i+shift]-Low[i+shift]);
               }
      	ATR = AvgRange/PeriodATR;
      	
      	if (shift==Bars-1-PeriodATR)
      	{
      	    Up=High[shift];
      	    Dn=Low[shift];
      	    Brick=Katr*(High[shift]-Low[shift]);
      	} 
      	
      	if (shift<Bars-1-PeriodATR)  
      	{
                  if (Close[shift] > Up + Brick)
      		{
      		    if (Brick==0) 
      		        BrickUp=0;
      		    else
      		        BrickUp=MathRound((Close[shift]-Up)/Brick)*Brick;	
      		
      		    Up = Up + BrickUp;
      		    Brick = Katr*ATR;
      		    Dn = Up - Brick;
      		    BrickDn = 0;
      		}
      		
      		if (Close[shift] < Dn - Brick) 
      		{
      		    if (Brick==0) 
      		        BrickDn=0;
      		    else
      		        BrickDn=MathRound((Dn-Close[shift])/Brick)*Brick;
      		
      		    Dn = Dn - BrickDn;
      		    Brick = Katr*ATR;
      		    Up = Dn + Brick;
      		    BrickUp = 0;
      		}
      	}
      	UpBuffer[shift]=Up;
      	DnBuffer[shift]=Dn;
      	}	
      	return(0);	
       }
      
      posted in Questions & Answers
      D
      danerius
    • Reverse Engineer the math for an Indicator

      Hi

      I stumbled upon this indicator and its based on an ATR adjusted Renko. Id really like to know the math behind it? How it readjusts the Renko Bar Size to the ATR Value?

      Its just that Ive completely forgotten where I found it. So I cant check.

      My question is? Can someone have a look at the code and maybe figure out the math for it?

      Thanks and regards /Bo

      0_1540803956276_Renko_v11.mq4

      posted in Questions & Answers
      D
      danerius
    • RE: Is this a thing?

      Cool. Thanks for the input. Im learning slowly 🙂

      /danerius

      posted in Questions & Answers
      D
      danerius
    • RE: Is this a thing?

      I think the technical phrase is Slippage 🙂

      I want to check broker slippage...

      posted in Questions & Answers
      D
      danerius
    • RE: Is this a thing?

      Hi fx

      My goal is to make sure my EAs are working as intended. Im suspecting that some of the issues Im having are broker/platform related. So Im trying out tried and tested EAs to confirm that

      The main thing that bugs me is that trades arent executed when the EA indicates it. So Im looking for an EA that is spot on timewise ie. not lagging or repainting

      Wich one should I try? MA Crossover?

      Thanks /danerius

      posted in Questions & Answers
      D
      danerius
    • RE: Is this a thing?

      Hi

      I did another try and added the indicator as the EA was running. And indeed it repaints... quite a lot... 😄

      Im trying to check that positions are placed properly

      Any other - more solid EA I can test that with?

      Thanks /danerius

      posted in Questions & Answers
      D
      danerius
    • Is this a thing?

      Hi

      Just to check to my EAs are working as they should. I tried a standard EA from the examples on fxdreema. Its not working as it should.

      Its supposed to place trades at Arrows. Sometimes it does. Sometimes it doesnt

      Is this a thing or is my Metatrader setup at fault?

      Thanks /danerius

      0_1534458230932_EA not working.png

      posted in Questions & Answers
      D
      danerius
    • RE: Example Calculations

      Hi rafaelgrecco

      THanks. Thats an excellent start for my experimenting 🙂

      /danerius

      posted in Questions & Answers
      D
      danerius
    • RE: Example Calculations

      Thanks fx

      I just a made a surpricing discovery 🙂

      High + Low / 2 is called a Median Price and a lot of Indicators have it as standard. It was a bit simpler than I thought

      /danerius

      posted in Questions & Answers
      D
      danerius
    • RE: Example Calculations

      A clarification...

      Since theres no response yet. I thought I might explain a bit better 🙂

      The principle goes like this illustration says.

      0_1533926545969_HLC3b.png

      Im not sure how do to do the math in fxdreema. Ive highlighted in Green the parts Im having trouble with

      0_1533926686052_HLC3.png

      Thanks and regards /danerius

      posted in Questions & Answers
      D
      danerius