Here you see data window
value 1 is TMA center line .it has value in both upper cloud and lower cloud.
Lower support band is value 5 and upper resistant band is value 4
For buy ,I use value 1 (buffer 0 ) and lower support band value 5(buffer 4)
for sell , value 1 and value 4 .
But open orders are randomly.
Please suggest me.
Code: Select all
double cloud =iCustom(NULL,0,"TMA_Centered_H1_V2_VS",0,0);
double resis =iCustom(NULL,0,"TMA_Centered_H1_V2_VS",4,0);
double supp =iCustom(NULL,0,"TMA_Centered_H1_V2_VS",5,0);
if( cloud <Close[0] && supp !=EMPTY_VALUE) return(buy);
if(cloud >Close[0]&&resis !=EMPTY_VALUE) return(sell);