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)