kindly add buffer in this indicator - page 3

 
Lorentzos Roussos #:

It would depend on the size of the window of the chart , the zoom level , and how "shrinked" or not the y axis of price is by the user and also on the % offset from the right end of the chart (the gap)

That means that with every change on the above you would have to recalculate the entire indicator . 

For instance : 

If you halve the window of the chart you will see less bars and that will lead to different levels because there will be less bars (b)

can i talk to you via whatsapp ?

 
maxtitu835 #:

can i talk to you via whatsapp ?

You can post what you want here there is no need for that .

A further simplification if you will : 

You have a cake , you cut off a slice of that cake . 

You take that slice and you point at the right side of it and say "this is the right side of the cake" , but this is true for any slice whichever way you cut it.

You are not accounting for the entire cake the slice was a part of.


 
Lorentzos Roussos #:

You can post what you want here there is no need for that 

maybe you won't add arrow if people use it blindly so that you called it's scam. 
a humble request to you please add arrow when price cross only 50% level, and the coded file throw via messege , it willbe very helpful for me

 
maxtitu835 #:

maybe you won't add arrow if people use it blindly so that you called it's scam. 
a humble request to you please add arrow when price cross only 50% level, and the coded file throw via messege , it willbe very helpful for me

You've ignored explanations of why this is dangerous for your account too 5 times already.

You're either not reading the replies , don't speak English or you are 100% aware of the danger.

Sending the code in private does not mean you can't sell it . 😊

Anyway if someone else wants to they can code it.

Cheers  ☕️

Edit : this is one of the only proper ways to do it more or less.

#property copyright "Go to forum"
#property link      "https://www.mql5.com/en/forum/452664"
#property version   "1.00"
#property strict
#property indicator_chart_window
#property indicator_buffers 5
#property indicator_color1 clrCrimson
#property indicator_color2 clrRoyalBlue
#property indicator_color3 clrYellowGreen
#property indicator_color4 clrWheat
#property indicator_color5 clrWheat
input int LBV=24;//LookBackValue
input double L1=0.8;//Level1
input double L2=0.5;//Level2
input double L3=0.2;//Level3

double lvl1[],lvl2[],lvl3[];
double buy[],sell[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
  SetIndexBuffer(0,lvl1);
  SetIndexBuffer(1,lvl2);
  SetIndexBuffer(2,lvl3);
  SetIndexBuffer(3,buy);
   SetIndexStyle(3,DRAW_ARROW,STYLE_SOLID,1,clrDodgerBlue);
   SetIndexArrow(3,233);
  SetIndexBuffer(4,sell);
   SetIndexStyle(4,DRAW_ARROW,STYLE_SOLID,1,clrRed);
   SetIndexArrow(4,234);
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
  int from=rates_total-prev_calculated;
  if(from==rates_total){
  from=rates_total-1-LBV;
  }
  int signal_point=rates_total-3-LBV;
  for(int i=from;i>=1;i--){
     //second loop
       int b_from=i+LBV;
       double highest=High[b_from],lowest=Low[b_from];
       for(int j=b_from-1;j>=i;j--){
       if(High[j]>highest){highest=High[j];}
       if(Low[j]<lowest){lowest=Low[j];}
       }
       double range=highest-lowest;
       lvl1[i]=NormalizeDouble((lowest+range*L1),_Digits);
       lvl2[i]=NormalizeDouble((lowest+range*L2),_Digits);
       lvl3[i]=NormalizeDouble((lowest+range*L3),_Digits);
       if(i<signal_point){
       //buy
       if(Low[i]<lvl3[i]){
         if(High[i]>lvl3[i]){
           buy[i]=Close[i];
           }
         }
       //sell
       if(High[i]>lvl1[i]){
         if(Low[i]<lvl1[i]){
           sell[i]=Close[i];
           }
         }
       }
     //second loop
     } 
//--- return value of prev_calculated for next call
   return(rates_total);
  }
 

Forum on trading, automated trading systems and testing trading strategies

I need HEEEELP, please, it's URGENT...really !

Alain Verleyen, 2017.01.11 20:25

Hello my friends,

This is a wonderful community, you are all so kind and smart. So I have this software, you know, to make money, I coded it (that's how we have to say when we found it on Internet right ?), and guess what, it's not working. I have it, but my bank account is not doing any money.

I don't want to learn, I don't want to pay, I don't want to read, I don't want to understand, just doing money. My bank account need it, but it's not working.

I would be so grateful, I will never forget the one who will help me.

Peace brothers.


 
Lorentzos Roussos #:

You've ignored explanations of why this is dangerous for your account too 5 times already.

You're either not reading the replies , don't speak English or you are 100% aware of the danger.

Sending the code in private does not mean you can't sell it . 😊

Anyway if someone else wants to they can code it.

Cheers  ☕️

Edit : this is one of the only proper ways to do it more or less.

why level plotted different place ?

 
maxtitu835 #:

why level plotted different place ?

Because this is the only backtestable way to do it . 

This way the calculation does not depend on : 

  • The chart window size
  • The gap from the right side
  • The adjustment of the y price axis
  • Which portion of the chart you are choosing to look at (or show in your screenshots)
  • The zoom level 

The first indicator was to showcase the issue .

What you can do next is find the look back value  (and maybe even the edge levels %)  that gives you the best signals and decide what will produce a signal by looking at the arrows sequence.

Symmetry between past and future is the first question you should ask about a strategy . Excluding the coin toss strategy 

 
Lorentzos Roussos #:

Because this is the only backtestable way to do it . 

This way the calculation does not depend on : 

  • The chart window size
  • The gap from the right side
  • The adjustment of the y price axis
  • Which portion of the chart you are choosing to look at (or show in your screenshots)
  • The zoom level 

The first indicator was to showcase the issue .

What you can do next is find the look back value that gives you the best signals and decide what will produce a signal by looking at the arrows sequence.

Symmetry between past and future is the first question you should ask about a strategy . Excluding the coin toss strategy 


1st indicator levels stay same place on chart but 2nd indicator level doesn't match with  1st indicator levels

 
maxtitu835 #:


1st indicator levels stay same place on chart but 2nd indicator level doesn't match with  1st indicator levels

it's not a bug 

Use the 2nd version .

If you are Manchester city the 2nd version is Kyle Walker

@Mods : Requesting permission to add a gif
 
Lorentzos Roussos #:

it's not a bug 

Use the 2nd version .

If you are Manchester city the 2nd version is Kyle Walker

@Mods : Requesting permission to add a gif

 

Let's go...this topic is funny.