How to create this condition

Hello ,I am trying to make a condition to buy a bar if the close 0 is less than 9 close above EMa.
that means If I have 9 bars above EMA i dont want the trade trigger .
Does someone have and idea how to put in builder this condition? thanks for any suggestion

I don’t really use strategy builder, so I’m not 100% certain how to do that, but when you create the entry conditions, you create sets of conditions in which to filter out the trade, so you would simply add all of the conditions together so that when a trade is taken, all of the conditions should be ticked off, like on a list.

I’m assuming you probably do have other criteria to enter the trade, and this was the only portion that you are having trouble with. If that is the case, you would need to add the condition that Close[0] !> EMA, and Close[1] !> EMA, etc until you reach the amount of candles you need to invalidate the trade.

Keep in mind, your logic may differ depending how you calculate OnBarUpdate.

1 Like

thanks I will look for that :grinning_face: