REV0LUTI0N

Up/Down Long Strategy

REV0LUTI0N ที่อัปเดต:   
This is a consecutive bar up/down strategy for going long only where you can specify how many bars up to buy and how many bars down to sell. It also has code to check and make sure the condition is still true when launching the official alert, which helps back testing and live results line up, however be sure to enter commission and slippage into the properties to accurately reflect profits. I added back testing date ranges to this so you can easily pull up and see back tested results for a certain date range. I also added a buy and sell message fields in the properties so you can launch alerts that will work with automated trading services. Simply enter your buy message and sell message into those fields in the properties and then when you create an alert enter {{strategy.order.alert_message}} into the alert body and it will dynamically pull in your buy and sell messages when it fires alerts.
เอกสารเผยแพร่:
Found problem with the logic behind calculation of bars up and down and corrected it.
เอกสารเผยแพร่:
Corrected up/down code.
เอกสารเผยแพร่:
Fixed issue with signal.
เอกสารเผยแพร่:
Added stop loss and take profit exits based on %. You can check or uncheck whether to use the stop loss and take profit exits.
เอกสารเผยแพร่:
Changed stop loss and take profit to tick based so it can be used with all chart types.
เอกสารเผยแพร่:
Added time restriction so you can enter trades only during the time frame specified. By default it's set to 0000-0000 but you can change it to any time frame, such at 0930-1600. Keep it set to 0000-0000 to have it ignore time restriction and take all trades.

I also added the ability to check off a box that will close the open trade at the end of the time restriction. So if you set the time frame to 0930-1600 and check off to enable close trade at end of time frame then it will look to exit the trade at the close of the next bar.
เอกสารเผยแพร่:
Set time restriction field to empty by default since otherwise the strategy won't take all trades like normal. So to enable time restriction enter a time frame in the format 0000-0000.
เอกสารเผยแพร่:
Added a separate close message that is used with the "Enable Close Trade At End Of Time Frame" so you can set a separate close message to be sent to your automation service telling it to close the open position.
เอกสารเผยแพร่:
Added more alert message fields so you can set a different alert message for each action, such as enter long or short, close long or short and take profit/stop loss.
สคริปต์โอเพนซอร์ซ

ด้วยจิตวิญญาณของ TradingView อย่างแท้จริง ผู้เขียนสคริปต์นี้ได้เผยแพร่เป็นโอเพนซอร์ส เพื่อให้ผู้ค้าสามารถเข้าใจและตรวจสอบได้ ไชโยให้กับผู้เขียน! คุณสามารถใช้ได้ฟรี แต่การใช้รหัสนี้ซ้ำในสิ่งพิมพ์อยู่ภายใต้กฎระเบียบการใช้งาน คุณสามารถตั้งเป็นรายการโปรดเพื่อใช้บนชาร์ตได้

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ เงื่อนไขการใช้บริการ

ต้องการที่จะใช้สคริปต์นี้บนชาร์ตใช่ไหม?