@seb-0
I use flags alot , made a filter session of about 200 blocks that triggered flags based on trade count.
If you want your flags to have a trigger point on true then set all the set flag names on init to false , so the first thing the ea does when started is to set them to false ( just to make sure )
There is a multitude of ways of doing it hope you find one that fits you :
Condition or conditions that are specific to trade buy / filter buy are true , set flag buy to true , if not set buy to false.
Condition or conditions that are specific to trade buy / filter buy are true, set flag true , stay true until sell contiontions are true , if sell contions are true set buy flag to false and sell to true .
It's a question of when and were you want to change your flag from true to false when its triggered , can be anywere , tick based , conditions based or time based , its up to you my firend π