Подскажите, пожалуйста, как создать буфер для сохранения только последних расчетных значений из цикла? - страница 3
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Также не понял в чем ошибка в моем решении, почему сохраняется только последнее занесенное значение, а то, что сдвигается - теряется, единственный вывод который напрашивается - на глобальном уровне можно сохранять только переменные, а массивы - нельзя.
Не любля быть должником, надеюсь, чем-то смогу помочь и Вам.
Параметры сдвига задаются в этих переменных
Вы писали - строится 20 моделей различных гармоник тренда
я для примера сделал 5 типов цен
Вы писали - буферный массив в который записывается один из сигналов при каждом старте функции
я записал все 5 типов цен в массив
Вы писали - цикл, в котором осушествляется реверсивный сдвиг всех накопленных сигналов
Здесь я попытался показать как можно сдвигать данные при перегрузке из массива в индикаторный буфер
Вы писали - сохраняется и выводится на график только значение последнего цикла функции, а то, что рассчитывалось на всей предыстории не накапливается в буфер, почему, - не могу понять
В этом примере все 5 типов цен с установленным сдвигом сохраняются в индикаторных буферах и отображаются на графике
>Не любля быть должником, надеюсь, чем-то смогу помочь и Вам.
не волнуйтесь вы мне ничего не должны :-)