pending orders not executing or not registering

 

hi,

i've been working on an EA that has pending orders but it seems like i'm missing something, there are no errors or warnings and i don't know what is wrong; i have never worked with pending orders before and i think its a simple fix that i cant find; even though i looked at free open codes i still don't get it.

i have copied the zigzag indicator into my main indicator folder so it can compile.

if you have any advice or suggestions or solutions for me please let me know.

thank you for your time

Files:
test.mq5  24 kb
 
1. You cannot execute an pending order at an zero price, the EntryPrice (zigzag data) has value = 0.

2. Clean up your code and make it easily compilable without editing before posting here.

double  EntryPrice = Back60[i]; // = 0