hhchenfx / Publications
Forum
Draw Vertical text turn with even number text size (say 14)
Hi, I have script that draw text vertically on chart. However, it draw correctly for all odd text size, sa 11, 13,15. When I change text size to even number (say,12 or 10), sometime text turn to horizontal . Thank you, HHC ObjectSetInteger (chart_ID,name, OBJPROP_FONTSIZE ,_fontsize);
Text label not show up on Main chart
Hi, I try to draw a text and put it vertical from High of a bar. The problem is that when the High is near top of screen, the text is created but not show up. It only shows up when I squeeze the chart. Is there any way to make the Text show up even partially ? Thank you so much. HHC void OnStart ()
Change Color for arrow in script
Hello, I try to change the arrow color to Aqua but this below code doesn't work. Could you help me fix it? Thanks a lot. HHC void OnStart () { long chart_ID= ChartID (); //---- obj_arrow, window to draw, time, place ObjectCreate ( "Arrow" , OBJ_ARROW , 0 , Time [ 1 ], High [ 1 ]);
MQL4 buffer trick, I cant believe MQL4 is that weird!
Hello, When I check how indicator run in Tester, the buffer show up wrong value. Here is the code. Somehow MQL4 read the "condition(i)" incorrectly. I check, check, check, go back to the original indicator to make sure that it works fine. if ((buy1[i]== 1 && condition(i)< 6 ) signal[i]= 2 ;
Help with finding Hour for a bar
Hi Everyone, I want to find the hour of the bar when my indicator show value. I am not familiar with that and any help is very much appreciated. Thank you. HHC if (my_indicator(i)!= EMPTY_VALUE ) {hour_of_bar[i]=....;}
My indicator is not updated when I change parameter
Hi Everyone, I wrote this indicator to calculate number of up bar and down bar within a certain window which I called "lookback". To my surprise, when I change lookback value, this indicator is not changed (still show the old value) But if I delete this indicator on chart and re-attach to chart, it
Chart with custom start and end date
Hi, I want to open a GBPUSD chart with starting date of 2010.01.01 to end date of 2015.01.01 Is there any way to do it? Thank you, HHC
Stock data into MT4 - issue of Date
Hi Everyone, I import Daily and Weekly data for US stock into MT4. What I see is for FX, Weekly data normally start on Sunday . For Stock weekly data start on Monday. I wonder if the above difference can cause any issue when I try to draw/analyze daily based on Weekly indicator value. Thank you. HC
My code is working but slow on a Min/Max, please help
Hi Everyone, I wrote the below code. The idea is: From a given bar i (say when MA5 cut MA10), lookback 15 bar, find Min Close bar (call min and nmin) From bar i to Min Close bar, find Max Close bar (call max2 and nmax2) From bar i to Max Close bar, find Min Close bar (call min2 and nmin2) I wrote 3
D1 price on H4 chart issue
Hi Everyone, This code below works fine with indicator value of D1 on H4 chart. But when I want to compare Close(previous day on D1) and Band(previous day on D1), it only work on D1 but not on H4. Could you please help me to fix it? Thank you so much. HHC for (i = limit - 1 ; i >= 0 ; i--) {