LexingtonStanley

JustaBox_NY_Lex

LexingtonStanley 已更新   
This indicator marks two boxes around the opening hour of the chosen session(s). One around the highs and lows and one around the highest open/close and lowest open/close for that hour., its main purpose if for backtesting the DR/IDR strategy but is useful for live trading as it auto adds the boxes and STD levels. The buy and sell signals that show up are not meant for trade entries, they just give an idea of whether there was a signal that day which is a close above or below the IDR (inner box lines), from there loops are started and it tests which STD levels get hit or if the opposite end of the box is crossed it considers it a stop out and closes the loops. The data from these loops can be pulled to email and then excel using the alert system.

This is the first thing i've ever coded, I put alot of work into it but id recommend going thru a few days randomly and checking the data matches up as expected.

This indicator only pulls data from the NY session, I have two others of identical functionality, the only difference being they pull the data from the London and Tokyo sessions respectively, wanted to include all three in one but I reached a limit. Search JustaBox_LDN_Lex and JustaBox_TKO_Lex

When live, once the hour of the chosen session resolves it marks the DR and IDR lines onward for a few hours, adds a 0.5 retracement line in the middle and STD levels above and below at 0.5, 1, 1.5, 2, 2.5, & 3.

There are labels that can be turned off, they show the prices these lines are set at.

Read the tooltips in the menu for more information.

(Might be self explanatory when you pull it but I'll add a key here for the titles of the data(had to keep them short due to character limit) and explain how the test works in the next couple of days but quickly:
Each STD levels has a true, false or NaN state, if its a buy signal for the session the STD levels below the bottom DR are turned off and will return NaN, but if its a sell signal they'll return false if they don't get hit true if they do. Each level has a cross time this is a bar number, you also get a bar number for the last bar in the DR box and one for when you received the buy or sell signal, so you subtract one of these from the STD X number and it will give you number of bars since 10:30 for NY sess or from when you received signal. Multiply that number by 5 to get the number of minutes. Gives prices for boxes, open and close prices of first and last candles in box and price of the NY day open for all sessions)
發布通知:
Data alert should work when market is out of hours now
發布通知:
na
發布通知:
Fixed timing issues, all the arrays now resolve on the same bar at 10:25-10:30 so youll get friday's session data when the session closes on monday. Message me if you find any issues or want something added, ill do my best.
開源腳本

本著真正的TradingView精神,該腳本的作者將其開源發布,以便交易者可以理解和驗證它。為作者喝彩吧!您可以免費使用它,但在出版物中重複使用此代碼受網站規則的約束。 您可以收藏它以在圖表上使用。

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。

想在圖表上使用此腳本?