You have to iterate (looping) then because you want to check (further) condition at particular bar after entry bar. Examples are in AmiBroker KB (knowledgebase site) and in this forum.
And no, using BarsSince() is not (proper) solution.
This can be done without looping. ApplyStop can do it by itself. You need most recent version (6.30 or higher).
What you are asking is NOT really N-bar stop or time. It is Max-loss stop. You want to exit when LOSS EXCEEDS threshold, and only do that 10 bar after entry.
That is easily done using ApplyStop ValidFrom/ValidTo argument:
// this max loss is valid only on 10th bar
ApplyStop( stopTypeLoss, stopModePercent, 3 /* amount */, True, False, 0,
10 /* valid from */, 10 /* valid to */ );
One thing to other amibroker users to note when using ApplyStop().
If you are already using ApplyStop() with stopTypeLoss to apply cut-loss, then using another ApplyStop() with stopTypeLoss to implement time stop will over-write the first ApplyStop(),
If you're trying to implement a time stop, you should be using stopTypeNBar, not stopTypeLoss. There should be no conflict between these two different types of stops.
I guess the question @thankyou18 was asking is - how do you implement both a stopTypeNBar and a stopTypeLoss, if you want to exit Either one of the below conditions occur:
If still in position and reached Nth bar, then exit
If still in position and reached Z loss, then exit
Can these both conditions be put in place (with applystop or not)?
Those stops (N-bar, max loss, or any other ApplyStop type) are independent and can co-exists without any problems. One stop does not overwrite another. If they occur on the same bar, the user can decide which one is taken first using SetStopPrecedence function.
There is a must read for every AmiBroker user and it is called "Users' Guide". All answers are there.