.

Re: Coding Help

#1041
kgovender wrote:
Thu Aug 15, 2019 6:48 pm
Hi Mr Tools and fellow Coders,

I need some assistance with modification of an indicator, what i am looking for is to have the visual alerts ( arrows) to only appear on a opposite colored candle. For example a BUY signal or arrow in the upward direction on a red candle or a SELL or an arrow in the downward direction on a green candle, is this possible? Your assistance would be highly appreciated.



With many thanks

Kris
try
SMA CrossOver_Justin_Alert_2.mq4
(4.26 KiB) Downloaded 158 times
The perfect indicatoris our head ...

Too many indicators confuse the head


Re: Coding Help

#1043
one more request please pacois, this indicator re-paints or signals forms after candle has closed, is there any way around that? Is it possible?



Many thanks and kind regards,



Kris

Re: Coding Help

#1045
Dear all friends, how to change the "band period=48" to the hour.
EX: 00:00 until 08:00 auto draw the fibonacci.
Everyday auto draw fibo at time 00:00 until 08:00.

Thanks.

Code: Select all

#property copyright "Copyright © 2009, Julien Loutre"
#property link      "http://www.forexcomm.com"
#property  indicator_chart_window
#property indicator_buffers  2
#property  indicator_color1  LightSkyBlue
#property  indicator_color2  Plum
 
 
 
extern int       Band_Period   = 48;
extern int       price_type    = 0; // 0 = High/Low | 1 = Open/Close
 
 
//---- buffers
double WWBuffer1[];
double WWBuffer2[];
double WWBuffer3[];
 
double ATR;
 
int init() {
   IndicatorBuffers(2);

   SetIndexStyle(0,DRAW_LINE,1);
   SetIndexStyle(1,DRAW_LINE,1);
   
   SetIndexLabel(0, "High");
   SetIndexLabel(1, "Low");
   
   SetIndexBuffer(0, WWBuffer1);
   SetIndexBuffer(1, WWBuffer2);
   
   IndicatorDigits(Digits+2);
   
   IndicatorShortName("Automatic Fibonacci");
   
   ObjectCreate("AutoFibo", OBJ_FIBO, 0, Time[0],High[0],Time[0],Low[0]);
   
   return(0);
}
int deinit() {
   ObjectDelete("AutoFibo");
}
int start() {
   int    counted_bars=IndicatorCounted();
   int    limit,i;
   
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
   
   for(i=limit-1; i>=0; i--) {
 
      WWBuffer1[i] = getPeriodHigh(Band_Period,i);
      WWBuffer2[i] = getPeriodLow(Band_Period,i);
      
      ObjectSet("AutoFibo", OBJPROP_TIME1, Time[Band_Period]);
      ObjectSet("AutoFibo", OBJPROP_TIME2, Time[0]);
      if (Open[Band_Period] < Open[0]) { // Up
         ObjectSet("AutoFibo", OBJPROP_PRICE1, getPeriodHigh(Band_Period,i));
         ObjectSet("AutoFibo", OBJPROP_PRICE2, getPeriodLow(Band_Period,i));
      } else {
         ObjectSet("AutoFibo", OBJPROP_PRICE1, getPeriodLow(Band_Period,i));
         ObjectSet("AutoFibo", OBJPROP_PRICE2, getPeriodHigh(Band_Period,i));
      }
      
   }
   return(0);
}
 
double getPeriodHigh(int period, int pos) {
   int i;
   double buffer = 0;
   for (i=pos;i<=pos+period;i++) {
      if (price_type == 0) {
         if (High[i] > buffer) {
            buffer = High[i];
         }
      } else {
         if (Open[i] > Close[i]) { // Down
            if (Open[i] > buffer) {
               buffer = Open[i];
            }
         } else {
            if (Close[i] > buffer) {
               buffer = Close[i];
            }
         }
      }
   }
   return (buffer);
}
double getPeriodLow(int period, int pos) {
   int i;
   double buffer = 100000;
   for (i=pos;i<=pos+period;i++) {
      if (price_type == 0) {
         if (Low[i] < buffer) {
            buffer = Low[i];
         }
      } else {
         if (Open[i] > Close[i]) { // Down
            if (Close[i] < buffer) {
               buffer = Close[i];
            }
         } else {
            if (Open[i] < buffer) {
               buffer = Open[i];
            }
         }
      }
   }
   return (buffer);
}


Re: Coding Help

#1046
mrtools wrote:
Fri Aug 16, 2019 3:43 am
kgovender wrote:
Thu Aug 15, 2019 10:48 pm
one more request please pacois, this indicator re-paints or signals forms after candle has closed, is there any way around that? Is it possible?



Many thanks and kind regards,



Kris
Try this one'
Thank you kindly Mr Tools

Re: Coding Help

#1047
mrtools wrote:
Fri Aug 16, 2019 3:43 am
....
Try this one'
Hi Master mrtools :D

Could you please create an TickChart indicator for mt4 with option to show vertical lines for major sessions Open? like the screenshort below :)
thanks you all & have a good day ;)



screenshort 's note by someone:
"You do need some basic reference to a point in time. The Tick Chart indicator can draw vertical lines on your chart when the major markets open or close. The user can change both time and color for the lines. The defaults for the colored lines are as follows:
Green US Open
Red London Close
Purple Tokyo Open
Blue London Open"

Re: Coding Help

#1049
kgovender wrote:
Thu Aug 15, 2019 6:48 pm
Hi Mr Tools and fellow Coders,

I need some assistance with modification of an indicator, what i am looking for is to have the visual alerts ( arrows) to only appear on a opposite colored candle. For example a BUY signal or arrow in the upward direction on a red candle or a SELL or an arrow in the downward direction on a green candle, is this possible? Your assistance would be highly appreciated.



With many thanks

Kris
nice kris.
Mr. Pacois or Mr. Tools will helps your idea ....
in addition, if it can remove other signal arrows , then the chart will be neat look... :)

Re: Coding Help

#1050
kgovender wrote:
Tue Aug 27, 2019 11:44 pm
Hi All,

Please could you kindly assist with a NRP version of the attached indicator?


Kind Regards,


Kris
Sorry that indicator is decompiled but what I can tell from the code it might be a Hull moving average, there are some nrp versions of that here in the forum.


  1. Similar Topics

    1. Help coding simple EA

      5 Replies 621 Views

      by Griff90, Tue Nov 13, 2018 8:36 am in Coding Help

      5 Replies
      621 Views
    2. Coding Help : telegram EA notification

      6 Replies 3048 Views

      by redbulls60, Sun Jan 21, 2018 9:45 pm in Coding Help

      6 Replies
      3048 Views

Return to “Coding Help”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest