Re: MT4 Indicator requests and ideas

12363
Dear All Coder
please modifie my indicator

what i want is
1. Elliminate double fractal ( 1 up fractal 1 vs down fractal each side)
2. dot length is 2x (Up to Down fractal distance)

thanks before




Code: Select all

//+------------------------------------------------------------------+
//|                                                   3 Fractals.mq4 |
//|                                                 Copyright © 2020 |
//|                                                 Sultan's_Channel |
//|                                          anto.mulyanto@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Anto.mulyanto"
#property link "anto.mulyanto@gmail.com"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Aqua
//---- buffers
double FUp[];
double FDn[];
double ZZ[];
double val1;
double val2;
int i;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+  
int init()
  {
//---- drawing settings
   SetIndexArrow(0, 159);
   SetIndexArrow(1, 159);
//----  
   SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 1);
   SetIndexDrawBegin(0, i);
   SetIndexBuffer(0, FUp);
   SetIndexLabel(0,"Atas");
//----    
   SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1);
   SetIndexDrawBegin(1,i);
   SetIndexBuffer(1, FDn);
   SetIndexLabel(1,"Bawah");
//---- 
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  { 
   
   i = Bars;
   while( i >= 0) 
     {   
       val1 = High[i] < High[i+1] && High[i+1] > High[i+2];
       //----
       if(val1 > 0 ) 
           FUp[i+1] = High[i+1];
           
       else if(val2 == 0 )
       
           FUp[i+1] = FUp[i+2];


       val2 = Low[i] > Low[i+1] && Low[i+1] < Low[i+2];
       //----
       if(val2 > 0 ) 
           FDn[i+1] = Low[i+1];
       else if(val1 == 0 )
           FDn[i+1] = FDn[i+2];
           
       i--;
     }   
   return(0);
  }
//+------------------------------------------------------------------+

Re: MT4 Indicator requests and ideas

12364
mulyanto wrote: Tue Mar 09, 2021 6:53 pm Dear All Coder
please modifie my indicator

what i want is
1. Elliminate double fractal ( 1 up fractal 1 vs down fractal each side)
2. dot length is 2x (Up to Down fractal distance)

thanks before




Code: Select all

//+------------------------------------------------------------------+
//|                                                   3 Fractals.mq4 |
//|                                                 Copyright © 2020 |
//|                                                 Sultan's_Channel |
//|                                          anto.mulyanto@gmail.com |
//+------------------------------------------------------------------+
#property copyright "Anto.mulyanto"
#property link "anto.mulyanto@gmail.com"

#property indicator_chart_window
#property indicator_buffers 3
#property indicator_color1 Red
#property indicator_color2 Aqua
//---- buffers
double FUp[];
double FDn[];
double ZZ[];
double val1;
double val2;
int i;
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+  
int init()
  {
//---- drawing settings
   SetIndexArrow(0, 159);
   SetIndexArrow(1, 159);
//----  
   SetIndexStyle(0, DRAW_ARROW, STYLE_DOT, 1);
   SetIndexDrawBegin(0, i);
   SetIndexBuffer(0, FUp);
   SetIndexLabel(0,"Atas");
//----    
   SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1);
   SetIndexDrawBegin(1,i);
   SetIndexBuffer(1, FDn);
   SetIndexLabel(1,"Bawah");
//---- 
   return(0);
  }
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
int start()
  { 
   
   i = Bars;
   while( i >= 0) 
     {   
       val1 = High[i] < High[i+1] && High[i+1] > High[i+2];
       //----
       if(val1 > 0 ) 
           FUp[i+1] = High[i+1];
           
       else if(val2 == 0 )
       
           FUp[i+1] = FUp[i+2];


       val2 = Low[i] > Low[i+1] && Low[i+1] < Low[i+2];
       //----
       if(val2 > 0 ) 
           FDn[i+1] = Low[i+1];
       else if(val1 == 0 )
           FDn[i+1] = FDn[i+2];
           
       i--;
     }   
   return(0);
  }
//+------------------------------------------------------------------+
It looks like a fractal support resistance type indicator. You could actually use this instead.
viewtopic.php?p=1295400436#p1295400436


Re: MT4 Indicator requests and ideas

12366
mulyanto wrote: Tue Mar 09, 2021 8:51 pm no is different,
i need to draw symmetrical up dan down triangle with it
Okay.
So you don't want to repeat the signals unless an opposite signal is formed. Well you can declare static integers at beginning of the code and change values after one condition is met thereby preventing repetition of same signal or bool condition can be used but not sure about that, haven't tried yet. But still I believe that it won't eliminate the signals in between as that depends on the fractal period. It would only prevent same signal from repeating.

Re: MT4 Indicator requests and ideas

12369
ChuChu Rocket wrote: Wed Mar 10, 2021 12:43 am Done what?
sorry bro, I'm have a question with an old indicator but I'm not use it now.
So. I found this indicator is this forum but maybe it's alert have problem. It alert many time. I try to change some options but nothing happen.
anyone can help me to fix it, just alert when candle close, and show message box when alert?
Thank you so much


Who is online

Users browsing this forum: ChatGPT [Bot], Facebook [Crawler], ffsss, Majestic-12 [Bot], Mickey Abi, RodrigoRT7, rudiarius and 90 guests