I would create a periodic function in Netlogo based on ticks and a price variable.
I would like a function where price is maintained between 2 rang (0 and 1) and I will be great if I can choose the periodicity.
my small reproducible example :
patches-own[
price
]
to setup
clear-all
ask patches [
set price 0.1
]
reset-ticks
end
to go
ask patches [
set price (sin ticks) + price
]
tick
end
Thank you in advance