Internal bar strength QQQ strategy

Internal bar strength QQQ strategy

Here is a simple “long only” automated strategy built upon the mean reversion behaviour of the QQQ ETF. It uses the Internal Bar Strength indicator which represent the weight of the closing price related to the day’s range. It is a simple indicator that point the fact that deepest close would regain on the few next days. This indicator is the same as a stochastic oscillator with only 1 period = short term deviation from the price mean would expect that price will came back to it.

When the IBS (or stochastic oscillator) fall below the 10 level, buy at next open. Close the trade if a candle close above the previous day high.

I also add a dynamic lot calculation made upon the strategyprofit. You can change the value of the “initial lot” (100 shares at start) and the “step profit” which add more shares whenever the strategy gain a new stepprofit (50$ by default).

This strategy would be adapted to other indices, i will certainly go forward on it.

 

 

 

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. alfredo • 02/08/2016 #

    Ciao Nicolas, how said on fb I’have a problem with this strategie, some times go in crash in time frame at 1 hour because need of a protection by a division of zero for last candle, you can help me? Thank for all.

  2. Nicolas • 02/08/2016 #

    Hello alfredo, there are only 2 divisions in the code, that may cause crash of the script. Have you made any modifications to the original code strategy? Thank you.

  3. alfredo • 02/08/2016 #

    Yes, thi is code modified
    defparam cumulateorders=false
    STO = (Close – Low) / (High – Low) * 100
    IF NOT LongOnMarket AND STO<10 THENBUY 2 CONTRACTS AT MARKETENDIF
    If LongOnMarket AND Close>High[1] THENSELL AT MARKETENDIF
    if not shortonmarket and sto>90 thensellshort 2 contracts at marketendif
    if shortonmarket and close<low[1] thenbuy at marketendif
    set stop $loss 250

  4. Nicolas • 02/08/2016 #

    I do not have any error Alfredo, even while testing on 150000 bars in the past. By the way, you should use EXITSHORT : http://www.prorealcode.com/documentation/exitshort/ to exit a short position. I have change your code accordingly :
     
    defparam cumulateorders=false

    STO = (Close - Low) / (High - Low) * 100

    IF NOT LongOnMarket AND STO<10 THEN
    BUY 2 CONTRACTS AT MARKET
    ENDIF

    If LongOnMarket AND Close>High[1] THEN
    SELL AT MARKET
    ENDIF

    if not shortonmarket and sto>90 then
    sellshort 2 contracts at market
    endif

    if shortonmarket and close<low[1] then
    exitshort at market
    endif

    set stop $loss 250
     
    Where does your error appear? Is it a ProRealTime window?

  5. alfredo • 02/08/2016 #

    thank for the council, when i do start the strategie on Italy at 1h some mornings happen that i find the sistem interrupt with the error, but I’ think that in the night the graph does not form some candle, maybe I’should make the strategy work from the 09:00 to 17:00 because the results are better, what do you think? 

  6. Nicolas • 02/08/2016 #

    I think it’s because of price gaps and/or quote interrupt. Anyway, be aware that this strategy were made to work on a daily basis and not in intraday, but if you can make it better, do it! 

  7. NA • 02/08/2016 #

    je trouve cette stratégie interessante même si le qqq en question etf n’a pas beaucoup de volume de transaction toutefois pour améliorer le code originel, j’y connais rien, aurriez vous nicolas ou alfredo peut la gentillesse quand vous aurez le temps d’intégrer vos modifications proposés au code d’origine, pour en faire bénéficier tous le monde ? est ce possible NA

  8. NA • 02/08/2016 #

    I find this strategy interesting even if the qqq in question etf does not have much transaction volume but to improve the original code, I know nothing about it, would you nicolas or alfredo can be kind when you have time to integrate your proposed changes to the original code, to benefit everyone? is it possible NA

avatar
Register or

Likes

avatar avatar
Related users ' posts
Patrice210 bonjour STANKO, effectivement la première ligne apparait en anomalie et je ne comprend pas v...
KumoNoJuzza Hi guys, Thanks @Stanko and everyone for your contributions. I have been playing around ...
Stanko Hi KumoNoJuzza, thanks for the post. I also tried your code with Dax and the performance is ...
kbrooks323 Hello would someone be willing to release a scan code for this? that would be helpful as I s...
Nicolas You can do easily this screener by using the assisted creation tool. It would take you about...
kbrooks323 I just figured it out thanks!
Vinks_o_7 Thanks Doc !
Maxime Baudin Intresting, thank you!
ggolfet Thanks Nicolas, I imported the itf file and solved the problem.
Hasardeur Hallo Nicolas, i tried to code the multi period heat map in combination with the Ehler’s ...
Nicolas Please open a new topic with the code in forum.
sir_i Bonjour à tous, Je suis nouveau sur le forum et sur la plateforme, pourriez-vous me dire com...
Nicolas Il faut simplement l'appliquer sur le prix.
sir_i Merci pour la réponse, je ne suis pas familier avec l'application de cette procédure simple,...
arnaudat Merci nicolas, j'ai déjà pris cette version et en plus je suis sur les futures. Par contre d...
ullle73 hi nicolas, when im making a strategy out of this i get the error "PRC_VWAP z-score" called ...
Nicolas Please open a new topic in the ProOrder forum section and post the code there in order to ch...
3agl3 voglio l indicatore
abd78 @Vonasi I saw that you did some work on seasonality, I wondered if you wanted to go here and...
Vonasi Sorry - my understanding of Italian is zero so if I watch the video I won't understand it I'...
Gianluca Hello Nicolas, my prt become stuck when i load the indicator, is there any problem with it?
m-zeter Has anyone found a solution for Sofitech? Would it be possible to draw two lines? An upper l...
m-zeter Hm, i dont know exactly why, but I think, that the indicator needs lots of power. I need als...
anametsinwha Is it possible to change it to highs and lows rather than open and close?
apachx Hi. Please, describe the algorithm in words. I want to understand how it works, but for now...
Madrosat Bonjour Nicolas la formule du stop loss est elle vraiment valable ?? il n'y a pas au depart ...
Nicolas Il y a peut-être un erreur en effet, essayer avec: set stop ploss (averagetruerange[14] * ...
Madrosat ok merci Nicolas c'est avec /pipsize que ça fonctionne
Francesco78 @snucke the results are not the same because the pictures refers to a few years ago. I am no...
snucke @Francesco78 i mean the results differ when i test on my own. so im curious of what the p...
sfl still working, using with filters like : trendFilterUp=close>average[190](close) tren...
Nicolas No sorry, please use this file instead into a prorealtime trading platform.
rdabbs I just installed this indicator. It opens in its own pane rather than overlaid on the chart ...
Nicolas Just apply it on your price chart instead and you're ok.
Wilko I am not familiar with the screener function, but I am quite certain it should be quite simp...
Gubben @Wilko have you had a look at this again since MTF support? Heard you talk on Börssnack btw..
Wilko @Gubben not really. It was something I posted to show that simpler is usually better. Hope y...
DANY overfit
fatlung Excuse me. I would like to the time zone applied to this strategy.
UkCoopDownUnder Hi, ProOrder does not recognise, "avfullnessthreshold" any ideas, thanks
diegofe_2000 cordial saludo NICOLAS , gracias por excelente indicador. ¿ es posible obtenerlo en MT4 ? ...
Nicolas Lo siento, pero no estoy trabajando para ayudar a la gente aquí de forma gratuita para promo...
diegofe_2000 Nicolas , gracias por tu atención. La pregunta era por curiosidad (yo no trabajo ni manejo ...
larmhen
8 years ago
HerveS_67 Bonjour, A quoi correspondent les données S, M, L ? Hello, What do the data S, M, L?
Vinks_o_7 aux paramètres à rentrer : 5 20 et 200...
Maxime Baudin Nice, thanks!
rowestock Hi Nicolas, I am revisiting this indicator and wanted to ask, is it possible to replace sty...
Nicolas Why not, please add a new request in our probuilder forums.

Top