OPEN-SOURCE SCRIPT

Open Price Strategy

已更新
This strategy is based on the idea of buying off the open price and then holding until the end of the trading day. It will however swap if price crosses over the open price line.

It will plot a line based on the open price at the time you select for it to search for the open price. You can also select the open price source and time frame.

Next select your entry price source and time frame which will be used to determine if price is above or below the line for entry or swap.

You can then select the time frame for when you can enter trades. This is useful if you want it to only enter and swap for the first say 30 minutes of the day then hold.

Next select your time frame to exit trades. If your ending time is 1555 for example it will exit the open trade at 1555 so that way you don't hold it overnight. You must select "Enable Close Trade At End Of Exit Time Frame" or it will hold the trade.

Lastly there's a stop loss and take profit you can enable and use. It will be up to you if you want to use it since if stop loss or take profit is hit then it will still re-enter and continue trading.
發行說明
I found in my own tests that the addition of an ema and cmf filter helped quite a lot to filter out unnecessary swaps around the open line so I've added both. Please be sure to uncheck the no filter box and check off the use filter box to use it. You can also choose source and timeframe for each to provide ultimately flexibility to fine tune your settings.
發行說明
Added the ability to wait to enter a trade until after an ema crosses the open line instead of entering trade immediately. This is useful for stocks that range a lot at open since if you choose the right size ema you won't get tricked into entering and swapping over and over. This is also useful for a take profit since if you reach your take profit target for the day you may not want to re-enter unless there's a strong push over the open line again, so waiting for an ema to cross will cause it to wait for this cross to happen before re-entering. Simply uncheck "Enter Trade ASAP" and check off "Wait For EMA To Cross Open Line" and then choose your ema length, source and time frame. It will then wait for that ema to cross up or cross down to enter a new trade or to swap.
發行說明
Added the ability to specify a time frame for all enter asap trades and another time frame for all wait to enter trades. This gives you the ultimate flexibility. You can now either check off only “Enter ASAP” and have the “Time Frame For Enter ASAP” time window last your entire trading session and it will enter all trades based on whether price is above or below the open line. Option 2 would be to check off only “Wait For EMA To Cross Open Line” and have the “Time Frame For Wait To Enter” time window last your entire trading session and it will enter trades based on whether the wait to enter ema has crossed the open line. The final option would be to check off both “Enter ASAP” and “Wait For EMA To Cross Open Line” and then specify a small time window in the “Time Frame For Enter ASAP” such as 0930-0931 which for a stock would cause it to enter that first trade of the day immediately and not wait for the ema to cross. Then your “Time Frame For Wait To Enter” can be the rest of your trading session so it only swaps or re-enters once the wait to enter ema cross the open line.
發行說明
Added an option under the stop loss and take profit section to check a box that will cause it to always exit if price crosses the open line. This is useful if you'd want to have a small time window for entry at the start of the day and then either price runs hard in that direction or if it reverses and crosses the open line you exit.
發行說明
Changed the open line as stop loss feature to use an ema that must cross the open line to exit. Also added a separate ema and cmf filter for the enter asap capability another set for the wait to enter capability.
發行說明
I made a very critical update and that is to remove the time frame selection for each of the filters. The way it tries to make an ema from a 5 minute chart appear on a 1 minute chart is flawed and causes live results to not match back testing. So I have removed that functionality to ensure the indicator is accurate. In addition, I made it so that the ema's do not appear on the chart unless they're enabled so your chart is less cluttered. Finally, I added the ability to trade contrarian signals if desired. This can be really useful for some assets where it's easier to find losing settings, but now you can turn those into profitable signals that you trade by using the contrarian option.
openpriceTrend Analysis

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明