A Free Range Breakout indicator for Prorealtime
Forums › ProRealTime English forum › General trading discussions › A Free Range Breakout indicator for Prorealtime
- This topic has 15 replies, 7 voices, and was last updated 3 weeks ago by vschmitt.
-
-
11/22/2024 at 7:00 PM #240673
The Range Breaker will help you seize the best trading opportunities! It detects range breakouts, which are often followed by durable price movements.
The indicator recognizes ranges on all assets in any time unit. It detects bullish and bearish breakouts and displays the targets and stop-losses on the chart.
You can download the indicator for free on this page:
XXXXXXXXXXXXXXXXXXXXXXXXXXX
Thanks to this indicator, you will never miss a breakout again. 😊
Have good trades
Vivien
11/23/2024 at 11:11 AM #240687Roberto je parle en français ou en anglais en haut il y a le drapeau français et en bas des lignes jaunes il y a indiqué cet article sera publié dans le forum anglais???? Cet article sera publié sur le forum anglais, veuillez choisir le forum approprié si vous souhaitez écrire dans une autre langue.Roberto I speak in French or English at the top there is the French flag and at the bottom of the yellow lines it says this article will be published in the English forum???? This article will be published in the English forum, please choose the appropriate forum if you wish to write in another language.
11/23/2024 at 12:02 PM #24068811/23/2024 at 12:31 PM #240690Post only direct links to a downloadable file, no other links to external websites. Thanks 🙂
11/23/2024 at 6:55 PM #24069711/25/2024 at 6:13 PM #240732Hello @Madrosat, yes I can 😊
Here is an example of a strategy I created from the Range Breaker indicator. It works on the Nasdaq in the 15-minute time unit:
Range Breakout Strategy12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879//--------------------------------------------------------//// *** Range Breakout Strategy - Nasdaq - 15-minutes *** ////--------------------------------------------------------//// Author: Vivien Schmitt// Website: https://artificall.com// Indicator: Range Breaker//--------------------------------------------------------//DEFPARAM CUMULATEORDERS = False//--------------------------------------------------------//// *** SETTING BLOCK *** ////--------------------------------------------------------//// Capital to investONCE CapitalToInvest = 10000// Position SizeNumberOfContracts = ROUND(CapitalToInvest / Close, 2)// Type of Breakout. Values: 1 to activate; 0 to inactivateONCE BullishBreakout = 1ONCE BearishBreakout = 0// Length of the range. Best values: 50; 100; 200ONCE RangeLength = 20// Extension of the RangeONCE RangeExtension = 10// Min range height (%)ONCE HeightMin = 20// Max range height (%)ONCE HeightMax = 50// Breakout conditions. Values: 1 to activate; 0 to inactivateONCE ValidatedBreakout = 0// Volume FilterONCE VolumeIncreases = 0// Trend FilterONCE PositiveTrend = 0ONCE NegativeTrend = 0// Target and Stoploss levelsONCE TargetLevel = 6ONCE StoplossLevel = 6// Starting YearONCE StartingYear = 2000// Font SizeONCE FontSize = 12// Return target and stoploss. Values: 1 to activate; 0 to inactivateONCE ReturnData = 1//--------------------------------------------------------////--------------------------------------------------------//// * INITIALIZATION OF THE VARIABLES * ////--------------------------------------------------------//ONCE myBreakout = 0ONCE myTargetLong = 0ONCE myStoplossLong = 0ONCE myTargetShort = 0ONCE myStoplossShort = 0ONCE myHeight = 0ONCE myTrend = 0//--------------------------------------------------------////--------------------------------------------------------//// *** IMPORT OF THE RANGE BREAKER INDICATOR *** ////--------------------------------------------------------//// -> TO DO BEFORE RUNING THE BACKTEST / A FAIRE AVANT DE LANCER LA BACKTEST //// * Uncomment the following line before running the backtest (Remove de "//" at the beginning of the line)// * Decommentez la ligne suivante avant de lancer le backtest (supprimez les "//" au début de la ligne)myBreakout, myTargetLong, myStoplossLong, myTargetShort, myStoplossShort, myHeight, myTrend = CALL "RANGE.BREAKER"[BullishBreakout, BearishBreakout, RangeLength, RangeExtension, HeightMin, HeightMax, ValidatedBreakout, VolumeIncreases, PositiveTrend, NegativeTrend, TargetLevel, StoplossLevel, StartingYear, FontSize, ReturnData](close)//--------------------------------------------------------//IF close >= myTargetLong THENmyBreakout = 0ENDIF//--------------------------------------------------------//// *** LONG POSITION OPENING *** ////--------------------------------------------------------//IF NOT OnMarket AND myBreakout = 1 THENBUY NumberOfContracts CONTRACTS AT MARKETSet Target Price myTargetLongSet Stop Price myStoplossLongENDIFYou will find the explanation of the indicator parameters in the documentation here:
https://artificall.com/docs/range-breaker/range-breaker-documentation-en/
Kind Regards
11/26/2024 at 1:03 AM #24074011/26/2024 at 10:50 AM #240754Hi SweTrade,
Have you downloaded the latest version of the indicator? The last version date is 2024/11/19.
I just copied and pasted the code from this topic on my Prorealtime platform, and it works.
Please try to download the indicator and restart the backtest.
I hope that will solve your problem.
1 user thanked author for this post.
11/26/2024 at 2:54 PM #240774Hello Vivien
Thanks for post, could not download from link when available do to already being subscribed.
Found a link you sent me in email.
I know the code above specifically states NAZDAQ 15min but saw promising results with Dax40 (DFB) @ 5,8,30 mins in back-tests.
Run all three in IG demo proOrder to see what happens going forward, all three initially ran, but all failed at the end of the relative timeframe period.
Tried with US Tech 100 (DFB) @ 15m, same outcome.
All stated error regarding ‘define or access of invalid array element’.
Any idea’s or comments.
It was pointed out that zero appears to be a valid index in documentation and so indicators and back-tests but the error from proOrder doesn’t specifically state zero as a vaild index.
Not tested this out myself to verify.
regards
11/26/2024 at 11:01 PM #240794Hello druby,
I emailed the latest version of the indicator to my list of subscribers some time ago. Indeed, it returns an additional parameter.
Send me an email, and I will send you the latest version of the indicator. You can contact me via the About page of my site: https://artificall.com/about/
Kind Regard
11/27/2024 at 11:39 AM #240796I emailed the latest version of the indicator
It be good to change the file on the link you posted to the latest version Indicator to save others wasted time.
I downloaded the Indicator file on the link I received by email on Monday (see attached for ss of file version) and set the Algo running today and, at the first run of the Algo, I got the same error as druby – ‘define or access of invalid array element’.
If you compare attached and below you will see same date … so where do we go from here please? Do I need to email you direct to get the latest Indicator file? Even though it appears that I have the latest Indicator file?
Thank You for Your Support
The last version date is 2024/11/19.
11/27/2024 at 12:00 PM #240798Hello,
You have the latest version of the indicator. The previous code is not a trading system but a backtest.
It is a code example that can help you find a setup for manual trading.
You could add the PRELOADBARS instruction in the code and set a minimum number of contracts to fix potential issues.
Here is the code, including PRELOADBARS and a minimum number of contracts:
Range Breakout Backtest123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384//--------------------------------------------------------//// *** Range Breakout Strategy - Nasdaq - 15-minutes *** ////--------------------------------------------------------//// Author: Vivien Schmitt// Website: https://artificall.com// Indicator: Range Breaker//--------------------------------------------------------//DEFPARAM CUMULATEORDERS = FalseDEFPARAM PRELOADBARS = 1000//--------------------------------------------------------//// *** SETTING BLOCK *** ////--------------------------------------------------------//// Capital to investONCE CapitalToInvest = 1000// Minimum number of contractsONCE NumberOfContractsMin = 0.5// Position SizeNumberOfContracts = MAX(ROUND(CapitalToInvest / Close, 2), NumberOfContractsMin)// Type of Breakout. Values: 1 to activate; 0 to inactivateONCE BullishBreakout = 1ONCE BearishBreakout = 0// Length of the range. Best values: 50; 100; 200ONCE RangeLength = 20// Extension of the RangeONCE RangeExtension = 10// Min range height (%)ONCE HeightMin = 20// Max range height (%)ONCE HeightMax = 50// Breakout conditions. Values: 1 to activate; 0 to inactivateONCE ValidatedBreakout = 0// Volume FilterONCE VolumeIncreases = 0// Trend FilterONCE PositiveTrend = 0ONCE NegativeTrend = 0// Target and Stoploss levelsONCE TargetLevel = 6ONCE StoplossLevel = 6// Starting YearONCE StartingYear = 2000// Font SizeONCE FontSize = 12// Return target and stoploss. Values: 1 to activate; 0 to inactivateONCE ReturnData = 1//--------------------------------------------------------//// * INITIALIZATION OF THE VARIABLES * //ONCE myBreakout = 0ONCE myTargetLong = 0ONCE myStoplossLong = 0ONCE myTargetShort = 0ONCE myStoplossShort = 0ONCE myHeight = 0ONCE myTrend = 0// *** IMPORT OF THE RANGE BREAKER INDICATOR *** //// -> TO DO BEFORE RUNING THE BACKTEST / A FAIRE AVANT DE LANCER LA BACKTEST //// * Uncomment the following line before running the backtest (Remove de "//" at the beginning of the line)// * Decommentez la ligne suivante avant de lancer le backtest (supprimez les "//" au début de la ligne)myBreakout, myTargetLong, myStoplossLong, myTargetShort, myStoplossShort, myHeight, myTrend = CALL "RANGE.BREAKER"[BullishBreakout, BearishBreakout, RangeLength, RangeExtension, HeightMin, HeightMax, ValidatedBreakout, VolumeIncreases, PositiveTrend, NegativeTrend, TargetLevel, StoplossLevel, StartingYear, FontSize, ReturnData](close)IF close >= myTargetLong THENmyBreakout = 0ENDIF// *** LONG POSITION OPENING *** //// NOT OnMarket ANDIF NOT OnMarket AND myBreakout = 1 THENBUY NumberOfContracts CONTRACTS AT MARKETSet Target Price myTargetLongSet Stop Price myStoplossLongENDIF// *** SHORT POSITION OPENING *** ////IF NOT OnMarket AND myBreakout=-1 THEN//SELLSHORT NumberOfContracts CONTRACTS AT MARKET//Set Target Price myTargetShort//Set Stop Price myStoplossShort//ENDIFI ran the code on Probacktest today and have no issues.
Kind Regards
Vivien
1 user thanked author for this post.
11/27/2024 at 12:25 PM #240799Hello Vivien,
I did not try anything – I just follow this thread with interest. 🙂
To avoid misunderstanding, your code does not run on Demo (or Live for that matter). The fact that it runs in Backtest does not tell much – or at least not everything.
It is a known issue that array-based code may run will in backtest but does not run in Demo/Live with not-understandable errors. So the least you need to do is run it yourself in Demo and see what happens. Next, chance is quite high that you will not be able to solve those errors.
A small chance exists that if you could elaborate as much as possible about where your code fails, people with the appropriate experience may be able to help.
In any event : though you may think it will be obvious that the Demo/Live environment behaves differently than Backtest, the issue most probably will be an internal PRT issue, that won’t allow “seeing-though” and therefore may not be solved at any time.N.b.: When I read druby’s post yesterday, I immediately wanted to advise you to eliminate all what’s arrays, if that is possible; notice that moist we do in PRT code can be done without arrays as well. Most, but not all. Just try it.
Regards and thank you for your work,
Peter11/27/2024 at 4:52 PM #240808IG Demo …Not to go too far down the array rabbit hole, the
‘defined or access an invalid index in an array’
error, does stop the proOrder algo if:
- An array is accessed and the array has not been defined.
- An array is defined but the array element is not defined.
The meaning of ‘define’ I think refers to, NO actual code, defining the array[element] = something, or, the defining definition is within a logic block that has not been executed before using.
Those appears to be different to, defining the array and, UNdefining the element, array[element] = UNDEFINED, which appears allowed.
The latter doesn’t appear to stop the algo even if it is accessed and used in a logic path, since UNDEFINED is probably taken as FALSE possibly.
In a calculation, it may be a different story, making the result n/a, and depending on where its used, maybe gives erroneous data and/or throws a different error.
Additionally, if a call’ed file RETURNS a not-defined array/element then you get the same error message.
Sending and/or/then RETURN’ing a UNDEFINED variable or array element from a called file gives the error:
‘server.strategy.probacktest.error.missing_data.call’
Also it appears that the array index works when zero.
Further, I couldn’t trigger an error for a FOR/LOOP or ARRAY INDEX being too big.
Maybe that’s a breeding ground for some bugs, I wonder what’s happening there!
Not yet seen any other array error’s, but not been deep down rabbit hole with complex code example, I keep #Peter’s advisory’s/warnings always in mind though.
#Vivien can you verify that array(s) ARE used in the Indicator, did early version come out before array’s in v11.
I also noticed that the contract size could be an issue in proOrder, re: your modification, but it didn’t get that far.
Still early days but Indicator and back-test work ok, had a good indication on DAX 15m today, reach 2nd target within 1 stop.
Only other thing that bugged me was with the y-axis auto scale, having to resize because some variables initially at zero or low values.
Not so bad when setup, but never fun.
Its a pity that it won’t run with proOrder, I second Peter suggestion to change that if possible.
Regards All
11/27/2024 at 5:20 PM #240812I was testing DAX 15m this morning to get an idea how indicator worked.
After giving a short breakout, it reached Target 1.
I entered after it pulled back near breakout point.
Came out with ~60 points.
Did get to Target 2. but I’d exited before then.
-
AuthorPosts
Find exclusive trading pro-tools on