InvestorsHub Logo
Post# of 102
Next 10
Followers 38
Posts 9736
Boards Moderated 2
Alias Born 06/03/2007

Re: SherriT post# 51

Thursday, 05/21/2009 1:39:11 AM

Thursday, May 21, 2009 1:39:11 AM

Post# of 102
The best way is with the shift parameter which is the very last parameter of the iCustom function. So in this example below, the first line represents the IFT value of the last bar and the second line represents the IFT value of the bar BEFORE that because of the very last parameter (the 1 and the 2).

*****************************
double ITrig=iCustom(NULL,0,"IFT",IHi,ILo,IRsi,IWma,1,1);
double PITrig=iCustom(NULL,0,"IFT",IHi,ILo,IRsi,IWma,1,2);
*****************************

So then, you can use (with the example above) something like this to get the cross of a horizontal line or variable called iHi.

*****************************
if(ITrig>iHi && PITrig<iHi) .....then do whatever....
*****************************

It's more difficult to code, but infinitely more possibilities exist with charts than VT could possibly handle because of the simplicity of the VT system. I also am pretty sure that VT repaints almost every damn thing on the screen and the tipoff is the fact that it will only autotrade at the close of the next bar. Seeing the trendlines and your brain making the trade is one thing, teaching a computer to act as your brain is much more intricate. I've only seen one VT system that showed a promise of autotrading and that was a fractal system that had as many or more lines of code as most MT4 systems I've seen.




"remember the mayonaise jar...keep cool but don't freeze"

Join the InvestorsHub Community

Register for free to join our community of investors and share your ideas. You will also get access to streaming quotes, interactive charts, trades, portfolio, live options flow and more tools.