EA isnt working within all conditions

 
Hi everyone I'm having trouble with my code specifically when the moving average goes above the upper band of the Bollinger band I want it to execute a buy order but it seems like it will only send a buy order if is above the band or if it is above the moving average regardless of the other condition. Like it chooses one or the other which is really weird to me. Also I want to post the code on here as well but I'm not sure how to do that can you guys please tell me how to do that so that you can see the code for yourself and see where the problem may be. Thank all of you for any help. 
 
Dezmo92:
Hi everyone I'm having trouble with my code specifically when the moving average goes above the upper band of the Bollinger band I want it to execute a buy order but it seems like it will only send a buy order if is above the band or if it is above the moving average regardless of the other condition. Like it chooses one or the other which is really weird to me. Also I want to post the code on here as well but I'm not sure how to do that can you guys please tell me how to do that so that you can see the code for yourself and see where the problem may be. Thank all of you for any help. 

press "New comment"

Insert Code using this button on top of the comments menu

Insert Code