See the whole picture with daily gap levels and analysis on intraday charts with custom trading hours enabled

v10.3
See the whole picture with daily gap levels and analysis on intraday charts with custom trading  ...

It’s easy to get lost in the sea of indicators and strategies out there, but one thing that is frequently overlooked these days is the simple gap. Often this gives us a great steer as to market direction from the open, especially if the market is at important support/resistance or in ‘overbought’/’oversold’ territory. The DAX seems to be particularly ripe for gap trading.

My code considers not just today’s gap (relative to yesterday’s close), but the previous three days’. It’s up to you to decide how likely it is that each gap will fill (I wish I could write some code that could assist here, but suspect this is beyond the current scope of PRT – ideas welcome), but I think it’s quite neat to have these levels preloaded on your chart as you prepare for the day ahead.

The code gives you the ability to change the trading hours, which I think is important, though I also believe that the markets seem to respect 8am London time (9am CET) as the ‘official’ open and 4.35pm London time (5.35pm CET) as the ‘official’ close on which gaps are evaluated so for instance if the market continues to drift lower in the evening session and then then opens at a similar level the following day, it will still tend to seek out the 4.35pm close from the previous day even though the charts will show there is no gap per se. As I am based in the UK, those users in other timezones will have to adapt the respective times in the code to their own timezone.

Why not just use DOpen, DHigh, DLow, DClose with custom trading hours you may ask? Because it occurred to me yesterday (I may be mistaken) that even when you play around with the trading hours, the DOpen/High/Low/Close values remain the same, i.e. they reflect the respective values over the entire 24-hour session, or maybe it’s because I didn’t tick the ‘Apply settings above to non-intraday timeframes’. Anyway I feel more confident using my manually coded versions…

Please feel free to suggest how to expand/improve the code.

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. JOKAMAURICE • 06/27/2019 #

    Thank you but I don’t really understand. The values don’t fit with what I see on my chart. I don’t understand why I see at the opening an upside and downside gap.

avatar
Register or

Likes

avatar avatar avatar avatar
Related users ' posts
reb Hello have you used this strat since last year ? live or Back test ? What are the results ?
beeb Yes last Year. But only back test
drysheep Hi all, did anyone test this strategy recently? As i dont get a single trade in the backt...
Vonasi An interesting idea that was easily turned into a strategy on a shorter time frame that appe...
Stenozar Hi Vonasi, is it possible for you to share your code here? thanks in advance
Vonasi Sorry Stenozar. I have only really spent an hour or so on this strategy so far and it is far...
Nicolas Sorry again, doing my best to fix this problem..
Gianluca Sorry but the 2° code that you posted have some problem it doesn't work
Leo I have to check
Yannick TradingDayLong = dayofweek = 1 or dayofweek = 2 or dayofweek = 3 or dayofweek = 4 or dayof...
Marlon Hey JohnScher, your code works fine, but my results aren't as good as yours. Even if I use ...
DarioMazza Bha... this code dont work. gg
ALE
6 years ago
settival CIAO ALE CREDO DI AVER SETTATO PER BENINO LO SCALPING INDICATOR MA NON VISUALIZZO I SEGNALI ...
graff.laetitia Hello, I'm sorry to bother you, I'm new to trading, I managed to download the indicator but ...
Alby118 i can get it to work? dax 1 min. upload indicator on the4 chart. thank you
Yannick Hello There is a mistake in trailing stop code, I think that this should fix the problem s...
Paul About the trailing-stop the way it's coded. That works for backtesting only, just look at th...
Jonny sorry paul, but system says that is not possible to put many stop order combined...what have...
BC
6 years ago
TempusFugit Thanks Bin, nice code, I can use several ideas of the way you build it
DarioMazza Thanks Bin, great concentration, i understand the first idea, but may u indicate me the asse...
Bin Hi Mazza This robot is optimized for DAX30.
GraHal Please forgive the daft question, but why is 3-bars-trailing-stop-williams-3.itf included a...
Kris75 Hi, Seems great but what would be the code for a stock ? Thanks, Chirs
oakenstream Paul, what is the best way in your opinion to know if I have over optimized?
TempusFugit Masala, thanks for your contribution. I don´t like the offmarket spreads neither ;) I unders...
Uveus Tempus, me da un error al validar el codigo, sobre la variable N. Al crear el indicador me ...
TempusFugit Hi Uveus, I am guessing you inserted the code of the indicator into the system code, is ...
teddy58 This system is the only one running on my PC, which i didn´t developed my myself. My forcast...
xpiga Hi! Is this system still working good? Anyone has it in the live account? It looks great. T...
Paul_Going Dutch Proformence will be beter with other starting hours and closing hours @Inertia
bertrandpinoy BONJOUR PAUL impossible de tenter le trading automatique, PRT me dis que l instruction "GRAP...
Paul Bonjour, supprimez les lignes avec un "graph"
bertrandpinoy merci. vous l utiliser actuellment sur quel instrument vous? et quel timeframe? Merci
rejo007 hello david, i'll try it could you tell me wich strategy do you use in real? thanks
David Somogyi Hello, I have a couple of DAX strategies of breakout and mean reversion. I'll try to post...
Roberto Blázquez Hi David, I just saw your strategy and it's good!!! I'm going to try it from today in real a...
Nicolas Questo indicatore è stato progettato solo per i dati intraday, ma potrebbe essere adattato a...
MrCrous //FR Bonjour, Dans le code ci dessus, je ne comprends pas ce que fait la ligne : linea...
Nicolas J'ai déjà répondu à cette question quelque part sur le forum. Il faudrait chercher un topic ...
stratobast Good afternoon everyone. Thanks Doctrading for your work. I have an issue while using this ...
stratobast My bad guys. I understood what was the problem. The indicator uses highs and lows for the Re...
samwarduk Has anyone tried this on Bitcoin GBP1? The results look amazing but every time mine trie...
gackeen Scusa Pier, scusate tutti, sono nuovo. Ho caricato il file e mi viene restituito il messaggi...
JR1976 HI Nicolas , I tried to copy paste but not import directly and the code works well I hav...
mcosta This code doesn't work on 10.3 platform(IG), neither with copy/paste nor with itf import, an...
Wing There's a few threads on the forum about backtest and live trades being different at times. ...
ET I agree with verdi55. As it is now, the code will only test for a breakout on the upside (li...
Philipjonasson are u still active Wing?
Nicolas Thanks for sharing your automated trading strategy idea. Even if you accumulate loosing orde...
Maz Ok. Potential here to build onto this. Have opened a forum thread for further discussion: h...
ALE
7 years ago
CSR strategy DAX 1 D
CSR strategy DAX 1 D
17
Strategies
Jesper I tried it on dax 1D and I did not get any trades. Shifted to 10H and it started working. Wo...
rgrgrgr I have the same problem
avatar
crazytrader Is this working?
Francesco78 I did a little bit of work on that and now the results looks better and more stable. Please...
Francesco78 I did a little bit of work on that and now the results looks better and more stable. Please...
Khaled Hi Francesco , thank you for sharing your hard work. Any idea why all orders are executed at...
JanWd Thank you for the coding, it seems promising. FTSE gives for the short term (5 min) promis...
Jan Wind 21.04.2019: I retested the strategy for the DAX 5 minutes , it works fine for 10.000 bars, b...
bertrandpinoy hello Francesco, are you still working on this strategy?

Top