Re: Step Indicators for MT4

131
chirvasamar wrote: Sun Apr 30, 2017 2:47 am Thank you, Mladen, it is certainly an idea!
I know very little about codes (mostly from reading yours and MrTools posts on forex-tsd and here) and I think maybe the start would be to adjust iCustom() to call the indicator I want to test.
However, I am not sure how to adjust an EA such way to open a trade when indicator is changing color, and close it when changing color again and to open an opposite trade. And so on.
Would be challenging for me to work on it, but I am willing to do it with some guidance.
Your input will be highly appreciated!
In general all you need to do in the "simple experts" is exactly that : simply adjust the iCustom() and it should work for that kind of a simple test


Re: Step Indicators for MT4

134
Dear code experts:
I saw the StepMA_v1.mq4 code, but i have concern about the the variable smin0,smax0,smin1,smax1, so the smax1 & smin1 are the previous bar value of smax0&smin0? and this code work? for my understanding, should write the code like: smin[shift], smin[shift+1].
Thanks!

Code: Select all

int start()
  {
   int shift,trend;
   double smin0,smax0,smin1,smax1;

   
   for(shift=Bars-1;shift>=0;shift--)
   {	
	if (HighLow>0)
	  {
	  smax0=Low[shift]+2*StepSize*Point;
	  smin0=High[shift]-2*StepSize*Point;
	
	  if(Close[shift]>smax1) trend=1; 
	  if(Close[shift]<smin1) trend=-1;
	  }
	 
	if (HighLow == 0)
	  {
	  smax0=Close[shift]+2*StepSize*Point;
	  smin0=Close[shift]-2*StepSize*Point;
	
	  if (Close[shift]>smax1)  trend=1; 
	  if (Close[shift]<smin1)  trend=-1;
	  }
	 	
	  if(trend>0 && smin0<smin1) smin0=smin1;
	  if(trend<0 && smax0>smax1) smax0=smax1;
		
	  if (trend>0) LineBuffer[shift]=smin0+StepSize*Point;
	  if (trend<0) LineBuffer[shift]=smax0-StepSize*Point;
	  
	  smin1=smin0;
	  smax1=smax0;


Re: Step Indicators for MT4

136
GERVASE wrote: Sun Jun 11, 2017 10:56 pm hi, code expert, please help to explain the above code , do not understand the smin1 & smax1 variable, thanks
Hi GERVASE
I think like these queries "Coding help" thread is more appropriate,thanks
Indicator is just a tool.

Use it only if it can benefit you. Leave it if you don't know how to use it optimally.

Re: Step Indicators for MT4

138
mntiwana wrote: Sun Apr 02, 2017 5:42 pm
Hi wojtek
Thanks for taking time,yes you pick it exact
unfortunately the experiment got flopped badly,i shifted 3 bar back and it was looking pretty (first upper picture) as every body analyses on back test or on demo but fail in live,same with me
when i figure out how it will be work actually i noticed till arrows prints on 3 bar back the price already gone ahead of 3 bar in real   (see in lower picture)

   
pls give link of this indicator..........
If you are not willing to take risk the unusual, you will have to settle for the ordinary.
Don't wait for extraordinary opportunities. Seize common occasions and make them great. Weak men wait for opportunities; strong men make them


Who is online

Users browsing this forum: Mickey Abi, talaate, TEAMTRADER, vvFish and 92 guests