Percentage Change Function

This is little code snippet can be copied and pasted into your own strategies and indicators to easily calculate some interesting percentage change levels within a given lookback period.

The function will return:
  • The price change from the start to the end of the period
  • The price change from the start of the period to the highest point within the period
  • The price change from the start of the period to the lowest point within the period

It was originally intended to be used in conjunction with other scripts to assist with decision making. However, it doesn't look too bad as an indicator and so plots have been added.

For more information regarding the code, some commentary and free tutorials, you can visit the Bactest-Rookies (.com) website.
從常用腳本中移除 新增至常用腳本


Is there a way to loop three seperate lookback periods? say 5 10 20?

'inp_lkb = input(5,10,20 title='Lookback Periods')
for each(Lookback_Periods =>

and then maybe some logic to determine if price is narrowing or expanding to open a window for a trade?

BacktestRookies JustTheCharts
Hi @JustTheCharts,
Yes - you could just have three separate inputs and call the function 3 times. An input() cannot return a list as far as I am aware, so you would need 3 separate ones.
+1 回覆
JustTheCharts BacktestRookies
@BacktestRookies, Thank you... its a matter of time before im going to give in and pay you for what i need.
+1 回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 如何運作 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特
概覽 個人資料設定 賬戶和賬單 推薦朋友 我的客服工單 幫助中心 發表的想法 粉絲 正在關注 私人訊息 在線聊天 登出