Hi Xrust,
Nice job on coding the Urban Towers strategy. I tested it and it seems to work fine.
I'm a novice coder still learning and I have a few questions about the coding, in particular this section:
//+------------------------------------------------------------------+ double hi_lo(bool hl,int i){double pr[6],hi,lo; pr[0] = iMA(Symbol(),Period(),Start_Period_Ma,0,Ma_Metod,Ma_Price,i); pr[1] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma,0,Ma_Metod,Ma_Price,i); pr[2] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*2,0,Ma_Metod,Ma_Price,i); pr[3] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*3,0,Ma_Metod,Ma_Price,i); pr[4] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*4,0,Ma_Metod,Ma_Price,i); pr[5] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*5,0,Ma_Metod,Ma_Price,i); ArraySort(pr,WHOLE_ARRAY,0,MODE_DESCEND); hi = pr[ArrayMaximum(pr)]; lo = pr[ArrayMinimum(pr)]; if(lo==0){lo = pr[ArrayMinimum(pr)-1];} if(lo==0){lo = pr[ArrayMinimum(pr)-1];} if(lo==0){lo = pr[ArrayMinimum(pr)-1];} if(hl){return(hi);}else{return(lo);} } //+------------------------------------------------------------------+
Is there a reason the 3 lines are duplicated and they are all the same? Or should there be different variables that get different values?
Thanks for sharing your efforts on coding this strategy...and good luck in your trading!
Robert
Hi,
Thanks for sharing! But it would be great to have a visual alert to be able to watch several pairs.
Hi Xrust,
Nice job on coding the Urban Towers strategy. I tested it and it seems to work fine.
I'm a novice coder still learning and I have a few questions about the coding, in particular this section:
//+------------------------------------------------------------------+ double hi_lo(bool hl,int i){double pr[6],hi,lo; pr[0] = iMA(Symbol(),Period(),Start_Period_Ma,0,Ma_Metod,Ma_Price,i); pr[1] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma,0,Ma_Metod,Ma_Price,i); pr[2] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*2,0,Ma_Metod,Ma_Price,i); pr[3] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*3,0,Ma_Metod,Ma_Price,i); pr[4] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*4,0,Ma_Metod,Ma_Price,i); pr[5] = iMA(Symbol(),Period(),Start_Period_Ma+Step_Period_Ma*5,0,Ma_Metod,Ma_Price,i); ArraySort(pr,WHOLE_ARRAY,0,MODE_DESCEND); hi = pr[ArrayMaximum(pr)]; lo = pr[ArrayMinimum(pr)]; if(lo==0){lo = pr[ArrayMinimum(pr)-1];} if(lo==0){lo = pr[ArrayMinimum(pr)-1];} if(lo==0){lo = pr[ArrayMinimum(pr)-1];} if(hl){return(hi);}else{return(lo);} } //+------------------------------------------------------------------+
Is there a reason the 3 lines are duplicated and they are all the same? Or should there be different variables that get different values?
Thanks for sharing your efforts on coding this strategy...and good luck in your trading!
Robert
this line to prevent installation of arrows at a price of 0, on the good we ought to do it in a loop, but it will slow down the terminal. And since the array has a dimension = 5, then three shifts quite enough.
Hi,
Thanks for sharing! But it would be great to have a visual alert to be able to watch several pairs.
HI GREAT WORK, BUT PLEASE IS THERE ANY CHANCE YOU CAN ADD IN A VISUAL OR AUDIO ALERT,SO WE CAN USE ON MULTIPLE PAIRS?
Hi,
Thanks for sharing! But it would be great to have a visual alert to be able to watch several pairs.
hello xrust this is a great strategy and a great indicator that you made,and like the other viewers said is there anyway that you can make me an alert of some kind that well notify us when a trade is about to happen.
my email address is bomman26@yahoo.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Urban Towers:
Author: Rustamzhan Salidzhanov