How to get a value back in EA when a Stop Order is Filled - MQL5

 

Hello Programmers

I am in the middle of programming my own EA. I'm not very experienced, so was wondering if someone could help me out here.

In my EA, I first declare a long breakout like this:

int longBreakout = 0;


When my Buy Stop Order gets filled I want the value of 1 to be assigned to the longBreakout variable.

How do I do that?