So, I use helper.lua and subscribe to a bar source, and I also subscribe to another bar source to create the pivot indicator:
- Code: Select all
function Prepare()
source = ExtSubscribe(200, nil, instance.parameters.PivotTF, priceType, "bar");
pivot = core.indicators:create("PIVOT", source, PivotTF, "Pivot", "HIST");
barSource = ExtSubscribe(100, nil, instance.parameters.PriceTF, priceType, "bar");
So I update the pivot indicator with ExtUpdate. Does the bar source update auto-magically? There does not seem to be an update function for price streams.