i need little help in function call in another function
are my call function here is ok? but its not working
Inserted Code
int filter() { double aaa = Bid; //-------------------------------------------------- Daily ---------------------- wclose= iClose(Symbol(),PERIOD_D1,1); wopen = iClose(Symbol(),PERIOD_D1,1); whigh = iHigh(Symbol(),PERIOD_D1,1); wlow=iLow(Symbol(),PERIOD_D1,1); calPivot = (whigh+wlow+wclose)/3; calRange=(whigh-wlow); R38 = calRange*0.382+calPivot; R61 = calRange*0.618+calPivot; R78 = calRange*0.786+calPivot; S38 = calPivot-calRange*0.382; S61 = calPivot-calRange*0.618; S78 = calPivot-calRange*0.786; //-------------------------------------------------- Weekly ---------------------- wclose1= iClose(Symbol(),PERIOD_W1,1); wopen1 = iClose(Symbol(),PERIOD_W1,1); whigh1 = iHigh(Symbol(),PERIOD_W1,1); wlow1=iLow(Symbol(),PERIOD_W1,1); calPivot1 = (whigh1+wlow1+wclose1)/3; calRange1=(whigh1-wlow1); RR38 = calRange1*0.382+calPivot1; RR61 = calRange1*0.618+calPivot1; RR78 = calRange1*0.786+calPivot1; SS38 = calPivot1-calRange1*0.382; SS61 = calPivot1-calRange1*0.618; SS78 = calPivot1-calRange1*0.786; //------------------------------------------------------------------------ if ((aaa > R78 ) || (aaa > RR38)){ int buy = 1; return(buy); } if ((aaa < S78 ) || (aaa < SS38)){ int sell = 1; return(sell); } return(0); } void open_sell() { int xxx = filter(); if (xxx < 1){ Order send---------------------------- } } void open_buy() { int xxx = filter(); if (xxx < 1){ Order send---------------------------- } }
are my call function here is ok? but its not working