Get max/min from bar range

Created at 14 Sep 2022, 13:05
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
V.

v.fiodorov83

Joined 24.07.2019

Get max/min from bar range
14 Sep 2022, 13:05


Hello Dear coders!

Help please with this task:

I want to bulid cBot which opens positions from higs/lows getting from 60(user defined) bars range. 

  • (On start) It should get collection last 60 history bars
  • Calculate and draw on chart High/Low from this collection
  • (On Bar/On Tick) After start - continue to "collect"(update) to this collection every new bar to calculate and draw next new (updated) high/low. Collection should be fixed size 60 bars, so when every new bar appears, then last one remove from collection/calculation

 

 

Thanks for your help, I understand that this can be quite time-consuming for you.


@v.fiodorov83