Hi i was looking for a piece of code to help identify if a charts background color is Black or White. And thus will adjust the colors of other objects on the chart based on the finding.
Thank you in advance
Thank you in advance
I will code your pivot EAs for no charge 25 replies
I will code your scalping EAs for no charge 163 replies
Oanda MT4 - Indicators and EAs not showing 2 replies
EAs and indicators relating to moutaki... 22 replies
InterbankFX has loaded its MT4 platform with custom EAs, indicators and scripts 1 reply
DislikedHi i was looking for a piece of code to help identify if a charts background color is Black or White. And thus will adjust the colors of other objects on the chart based on the finding. Thank you in advanceIgnored
[color=black]//+------------------------------------------------------------------+[/color] [color=black]//| The function receives chart background color. | //+------------------------------------------------------------------+ color ChartBackColorGet(const long chart_ID=0) { //--- prepare the variable to receive the color long result=clrNONE; //--- reset the error value ResetLastError(); //--- receive chart background color if(!ChartGetInteger(chart_ID,CHART_COLOR_BACKGROUND,0,result)) { //--- display the error message in Experts journal Print(__FUNCTION__+", Error Code = ",GetLastError()); } //--- return the value of the chart property return((color)result); } //+------------------------------------------------------------------+ //| The function sets chart background color. | //+------------------------------------------------------------------+ bool ChartBackColorSet(const color clr,const long chart_ID=0) { //--- reset the error value ResetLastError(); //--- set the chart background color if(!ChartSetInteger(chart_ID,CHART_COLOR_BACKGROUND,clr)) { //--- display the error message in Experts journal Print(__FUNCTION__+", Error Code = ",GetLastError()); return(false); } //--- successful execution return(true); }[/color]
DislikedPlease great codes help to make this WPR Candles a multi-time frame and color of overbought, oversold, and neutral level. level--- overbought -20 color of choice oversold -80 color of choice Neutral level between -20,,,,,-80 color of choice Please i will be grateful.{file}
Ignored
Disliked@ cja and @mntiwana I have attached an indicator that draws horizontal lines, it contains price value. The problem is when I change price value it won't change automatically. Every time, I need to delete existing H Lines from objects to redraw lines. Can you rectify this issue? {file} {image} {image}Ignored
Dislikedhi ... can any one share the formula for how to get round numbers ... like 100 200 300 upto 1000 then 1100 1200.... like...Ignored
Disliked{quote} Hi, i am not a coder but maybe this helps {file} https://www.forexfactory.com/thread/...hboards?page=4Ignored
Disliked{quote} zbig Objects (H line) not sync to another chart (Using object sync indicator) after adit price value. I placed SnR.mq4 Indicator in both charts (SAME PAIR).Ignored
DislikedHi i was looking for a piece of code to help identify if a charts background color is Black or White. And thus will adjust the colors of other objects on the chart based on the finding. Thank you in advanceIgnored
Dislikedcan someone kindly change the "blue & red" dot "buy and sell" signals to arrows above and below the respective candles as seen near the upper right section of the screenshot below.{image} muchio gracias {file}Ignored
Disliked{quote} ---------------- {quote} Hi both you guys First,what is "Nema" Nema is an continuation of "EMA" - ema of (ema of (ema of ...))) calculated averages with binomial coefficients (also known as Pascal's triangle) applied for weight coefficients of each ema. What it means : it is a continuation of ema, dema, tema, ... nema. So, a filter after all nema depth 1 is ema nema depth 2 is dema nema depth 3 is tema nema depth 4 is qema nema depth 10 is decema And so on a list of EMAs family indicators,nema can calculate up to 49 ema (whatever that would...Ignored
if (mode_ema>=0) for (i=limit1;i>=0;i--) Ema1[i]=iMA(Symbol(),Period(),EMA_period,0,MODE_EMA,price_mode,i); if (mode_ema>=1) for (i=limit2;i>=0;i--) Ema2[i]=iMAOnArray(Ema1, 0,EMA_period,0,MODE_EMA,i); if (mode_ema>=2) for (i=limit3;i>=0;i--) Ema3[i]=iMAOnArray(Ema2, 0,EMA_period,0,MODE_EMA,i); if (mode_ema>=3) for (i=limit4;i>=0;i--) Ema4[i]=iMAOnArray(Ema3, 0,EMA_period,0,MODE_EMA,i); if (mode_ema>=4) for (i=limit5;i>=0;i--) Ema5[i]=iMAOnArray(Ema4, 0,EMA_period,0,MODE_EMA,i); if (mode_ema>=5) for (i=limit6;i>=0;i--) Ema6[i]=iMAOnArray(Ema5, 0,EMA_period,0,MODE_EMA,i); if (mode_ema>=6) for (i=limit7;i>=0;i--) Ema7[i]=iMAOnArray(Ema6, 0,EMA_period,0,MODE_EMA,i); if (mode_ema==0) for (i=limit1;i>=0;i--) nEma[i] = 1.0*Ema1[i]; if (mode_ema==1) for (i=limit2;i>=0;i--) nEma[i] = 2.0*Ema1[i]- 1.0*Ema2[i]; if (mode_ema==2) for (i=limit3;i>=0;i--) nEma[i] = 3.0*Ema1[i]- 3.0*Ema2[i]+ 1.0*Ema3[i]; if (mode_ema==3) for (i=limit4;i>=0;i--) nEma[i] = 4.0*Ema1[i]- 6.0*Ema2[i]+ 4.0*Ema3[i]- 1.0*Ema4[i]; if (mode_ema==4) for (i=limit5;i>=0;i--) nEma[i] = 5.0*Ema1[i]-10.0*Ema2[i]+10.0*Ema3[i]- 5.0*Ema4[i]+ 1.0*Ema5[i]; if (mode_ema==5) for (i=limit6;i>=0;i--) nEma[i] = 6.0*Ema1[i]-15.0*Ema2[i]+20.0*Ema3[i]-15.0*Ema4[i]+ 6.0*Ema5[i]-1.0*Ema6[i]; if (mode_ema==6) for (i=limit7;i>=0;i--) nEma[i] = 7.0*Ema1[i]-21.0*Ema2[i]+35.0*Ema3[i]-35.0*Ema4[i]+21.0*Ema5[i]-7.0*Ema6[i]+1.0*Ema7[i];
Disliked{quote} Open your editor and use F1 to open up the MetaQuotes reference for code. //+------------------------------------------------------------------+ //| The function receives chart background color. | //+------------------------------------------------------------------+ color ChartBackColorGet(const long chart_ID=0) { //--- prepare the variable to receive the color long result=clrNONE; //--- reset the error value ResetLastError(); //--- receive chart background color if(!ChartGetInteger(chart_ID,CHART_COLOR_BACKGROUND,0,result)) { //--- display...Ignored
Disliked{quote} hello. I did not change the logic of the indicator. I just corrected the removal of horizontal lines.Ignored
Disliked{quote} Hi Thanks for the Code, im pretty new to coding so im not sure how to implement it correctly. I was thinking of creating an "if" function for something like this ObjectCreate("Main_Panel",OBJ_RECTANGLE_LABEL,0,0,0,0,0,0); So, if background color = clrWhite ObjectSet("Main_Panel",OBJPROP_BGCOLOR,Panel_Color1); and if the background color = clrBlack ObjectSet("Main_Panel",OBJPROP_BGCOLOR,Panel_Color2); how would i implement top code to something like this.Ignored