BacktestRookies

Babypips: Inside Bar Momentum Strategy

The strategy contained in this post comes courtesy of babypips (.com), an excellent resource for all thing forex related. If you are new to trading, the site is definitely worth checking out!

Code commentary and an introduction to Inside Bars are available for this post on the Backtest-Rookies (.com) website.

Note: If you are interested in custom development services, please check out our services page on the Backtest-Rookies site.

Strategy Overview

Inside Bar Momentum Strategy.

  • Inside Bar Detection
  • Position sizing based on stoploss distance (Note: Based on equity and assumes that the account currency is the counter currency.
  • Stop buys for entries
  • Takeprofit / Stoplosses for exits
  • Control Stopbuy, Takeprofit and Stoploss targets with inputs
  • Control Backtest start/end dates
開源腳本

秉持真正的TradingView精神,該腳本的作者將其開源發佈,因此交易者可以理解和驗證它。為作者加油!您可以免費使用它,但是在發佈中重複使用此程式碼受網站規則的約束。您可以把它加入到常用以在圖表上使用它。

想在圖表上使用此腳本?

評論

can this execute trades on your behalf?
+6 回覆
good job!but how to change it to indicator and add alert?
+1 回覆
@koolaysun, change "strategy" to "study" in row7. And add use the function alertcondition for alerts.
+1 回覆
Blitz20 Phi-Deltalytics
@Phi-Deltalytics,
I have been trading for years but just started with trading view and love the program.

I changed to study but get:
Add to Chart operation failed, reason: line 7: Undeclared identifier `study.percent_of_equity`;
line 7: Unknown argument `default_qty_type` of type type_error;
line 7: Unknown argument `default_qty_value` of type literal integer
Add to Chart operation failed, reason: line 7: Undeclared identifier `study.percent_of_equity`;
line 7: Unknown argument `default_qty_type` of type type_error;
line 7: Unknown argument `default_qty_value` of type literal integer

I want to add the alert function
回覆
anyone knows how i add specific time trade : for example i want to test it only beetween 0930-1100 ?
回覆
Anyone willing to convert this to Alert (STUDY) file? I tried to follow the mentioned instructions will no success...
回覆
SreeniK OMFSmike
@OMFSmike, yes, I needed it too
回覆
首頁 股票篩選器 外匯篩選器 加密貨幣篩選器 全球財經日曆 關於 圖表功能 價格 推薦朋友 網站規則 幫助中心 網站 & 經紀商解決方案 小工具 圖表解決方案 輕量圖表庫 部落格 & 新聞 推特