Hi there,

I'm new, try to understand the concept and enjoy the platform (coding is not my area of expertise).

Now I'm stuck for quite a while now and I was wondering if the community can give me a hint or refer to a discussion with this topic. It seems I don't understand the logic with OnOrderEvent/loop.,

When I get a buy signal I take an initial position. In case I didn't receive a liquidate signal yet but additional buy signals, I want to averaging down the position IF the current price is lower than the AverageFillPrice of the last order. (Later I want to treat these further signals/position differently: bigger size the lower the current price is vs the AverageFillPrice of the initial position, but that's for later). I would think this is a common use case maybe solved with loops but I don't get my head around in combination with OnOrderEvent. First I tried different ways only within OnData. 

I already watch the respective boot camp videos of Jared and Louis and found this thread but could't apply it to my needs: 

I attached the current resigned status, a simplified version with RSI signal. In reality I'm going to use different indicators. so it's all about averaging down position for now. 

Any hint how to tackle this is greatly appreciated.

Thank you

Heiko