Updated strategy
Forums › ProRealTime English forum › General trading discussions › Updated strategy
- This topic has 30 replies, 7 voices, and was last updated 5 years ago by GraHal.
-
-
05/31/2016 at 9:53 AM #8490
HERE IT IS… pleas ejoin me here… let’s see if Nicolas will have time to help us…
1 user thanked author for this post.
05/31/2016 at 9:53 AM #849305/31/2016 at 10:09 AM #849905/31/2016 at 10:13 AM #850005/31/2016 at 10:38 AM #8503Hi there, there were a bug in IG demo server that causes trouble with pending orders. Strategies that were running may have to be relaunched to have it all good now.
Nice bell curve on your random distribution strategies results, may I have a look to the confidence interval?
05/31/2016 at 11:38 AM #8519Hi Nicolas, since when this IG demo problems occurs? Can we have more info? Will IG inform us?
Confidence intervall of montecarlo it is uploaded at the top od this page. do you mean that?
@Adolfo join me here http://www.prorealcode.com/topic/montecarlo/
05/31/2016 at 2:27 PM #853406/01/2016 at 8:06 PM #8615Could you please confirm that the code and file in the library are the last version of your strategy please? This one is actually being tested and presented in a famous french trading forum named “Videobourse” : http://www.videobourse.fr/forum-forex/viewtopic.php?f=12&t=13369
So I want to be sure everything is ok. Thanks.
06/01/2016 at 9:29 PM #861906/01/2016 at 10:10 PM #8621Is not a significant difference between results, but I feel better with this change. Same posted code without “SPREAD” variable, since is not “optimal” for real time trading.
A few losses in a row this week (as expected) 😉 There we go!
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198//-------------------------------------------------------------------------// Main code : Binomio AutoTrading Bot DAX//-------------------------------------------------------------------------REM #########################################REM ## Binomio AutoTrading Bot 2016 DAX 1m ##REM #########################################REM Not cumulate ordersdefparam cumulateorders = falseREM No positions open before this timedefparam flatbefore = 080000REM All positions will be closed after this timedefparam flatafter = 213000REM MAX and MIN we want to operateREM No orders will be set if range is greater thanmaxrange = 150REM No orders will be set if range is shorter thanminrange = 20REM #########profittrendvalue = 1.5 //1.5profitrangevalue = profittrendvalue//5 //1.7rangepercent = 0.1 //0.1REM ######################REM ## MONEY MANAGEMENT ##REM ######################Capital = 3000Risk = 0.5REM RESET MAIN VARIABLES EACH NEW DAYif Dayofweek = 5 thentrading = 0elseIf intradaybarindex = 0 thentrading = 1bullish = 0bearish = 0inrange = 0rangepips = 0enter1 = 0enter2 = 0enter3 = 0enter4 = 0abovemax = 0abovemin = 0belowmax = 0belowmin = 0//profittrend = 0profitrange = 0endifendifREM CHECK CONTROL TIMEstarttime = 075500endtime = 075900REM RANGE ESTABLISHMENTIF time >= starttime and time <= endtime thenREM NIGHT MAXmaximo = dhigh(0)REM NIGHT MINminimo = dlow(0)REM RANGE IN PIPS BETWEEN NIGHT MAX AND MINrangepips = round(maximo-minimo)REM PROFIT IN PIPS EXprofitrange = rangepips*profitrangevalue// i.e we could add here "*0.9" to reduce the profit objective//profittrend = rangepips*profittrendvalue //1.5REM DISTANCE FROM LINES TO SET ORDERSmargin = rangepips*rangepercentREM SET MAX ORDER PLACESabovemax = maximo+marginbelowmax = maximo-marginREM SET MIN ORDER PLACESabovemin = minimo+marginbelowmin = minimo-marginREM SET NUMBER OF PIPS TO RISK EACH TRADEStopLoss = round(margin*2)if StopLoss<6 thenStopLoss = 6endifendifREM Calculate contractsequity = Capital + StrategyProfitmaxrisk = round(equity*(Risk/100))PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)REM SPREAD CHECK//IF Time>=090000 and time<173000 then//spread = 0 // Backtest spread is set to 1//else//spread = 1 // Backtest spread 1 + 1 = Real spread//endifREM CONDICION DEL MERCADOinrange = Close<maximo-margin and close>minimo+marginbullish = Close>(maximo+margin)bearish = Close<(minimo-margin)semibull = Close>maximo-margin and close<maximo+marginsemibear = close<minimo+margin and close>minimo-marginREM START SETTING ORDERSREM FIRST TRADESif not onmarket and trading = 1 and rangepips<=maxrange and rangepips>=minrange thenREM RESET VARIABLES EACH TIME WE ARE OUT OF THE MARKETif bearish thenif enter4=0 thensellshort PositionSize contract at market//belowmin limitendifif enter1=0 thenbuy PositionSize contract at abovemin stopendifendifif bullish thenif enter3=0 thenbuy PositionSize contract at market//abovemax limitendifif enter2=0 thensellshort PositionSize contract at belowmax stopendifendifif inrange thenif enter1=0 thenbuy PositionSize contract at abovemin limitendifif enter2=0 thensellshort PositionSize contract at belowmax limitendifif enter3=0 thenbuy PositionSize contract at abovemax stopendifif enter4=0 thensellshort PositionSize contract at belowmin stopendifendifif semibull thenif enter3=0 thenbuy PositionSize contract at abovemax stopendifif enter2=0 thensellshort PositionSize contract at belowmax stopendifendifif semibear thenif enter1=0 thenbuy PositionSize contract at abovemin stopendifif enter4=0 thensellshort PositionSize contract at belowmin stopendifendifendifbuytrend = tradeprice(1)>maximobuyrange = tradeprice(1)<maximoselltrend = tradeprice(1)<minimosellrange = tradeprice(1)>minimoREM SI ESTAMOS LARGOSif longonmarket thenREM IF TRADE PRICE IS ABOVE MAXif buytrend thenenter3 = 1if enter2=0 thensellshort PositionSize contract at belowmax stopendifendifREM IF TRADE PRICE IS INTO DE RANGEif buyrange thenenter1 = 1if enter4=0 thensellshort PositionSize contract at belowmin stopendifendifendifREM SI ESTAMOS CORTOSif shortonmarket thenREM SI HEMOS VENDIDO POR DEBAJO DEL MINIMOif selltrend thenenter4 = 1if enter1=0 thenbuy PositionSize contract at abovemin stopendifendifREM SI HEMOS VENDIDO DENTRO DEL RANGOif sellrange thenenter2 = 1if enter3=0 thenbuy PositionSize contract at abovemax stopendifendifendifset stop ploss stoplossset target pprofit profitrangeBest trading ever 😉
08/17/2016 at 8:11 AM #11774Hi Adolfo,
Great you are sharing you knowledge here!
I copied you code into PRT and tried a back test in 1 minute resolution and 10000 units. But it doesn’t buy or sell anything when trying on DAX. Is it something more I need to configure to make it work? Appreciate your advice, thanks.
08/21/2016 at 10:07 AM #11983Hi @Adolfo and david-1984
Why did this interesting and useful discussion come to an end so abruptly?
Did below happen? If yes, please add a link so we can ‘see the end of the story’ please?
If you send me your data I run it whit my system (very similar with nicolas system) and we can open a new thread where to disucuss how to read the montecarlo.
Many Thanks
GraHal
05/18/2017 at 9:25 PM #3603308/10/2018 at 3:51 PM #7797407/06/2019 at 11:16 AM #102049Hi all,
I´m checking this strategy and it works really good right now, even after three years since last update. Anybody is using this strategy in Real right now? Anyone make new changes?
I was doing some tests and I would like to check it with 200k bars with this configuration. Anyone can help me and tell us how it works with 200k bars?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199//-------------------------------------------------------------------------// Main code : Binomio AutoTrading Bot v.2 DAX//-------------------------------------------------------------------------REM ###############################################REM ## Binomio AutoTrading Bot Julio 2019 DAX 1m ##REM ##############################################REM Not cumulate ordersdefparam cumulateorders = falseREM No positions open before this timedefparam flatbefore = 080000REM All positions will be closed after this timedefparam flatafter = 213000REM MAX and MIN we want to operateREM No orders will be set if range is greater thanmaxrange = 150REM No orders will be set if range is shorter thanminrange = 20REM #########profittrendvalue = 2//1.5profitrangevalue = profittrendvalue//5 //1.7rangepercent = 0.1//0.1REM ######################REM ## MONEY MANAGEMENT ##REM ######################Capital = 3000Risk = 0.5REM RESET MAIN VARIABLES EACH NEW DAYif Dayofweek = 5 thentrading = 0elseIf intradaybarindex = 0 thentrading = 1bullish = 0bearish = 0inrange = 0rangepips = 0enter1 = 0enter2 = 0enter3 = 0enter4 = 0abovemax = 0abovemin = 0belowmax = 0belowmin = 0//profittrend = 0profitrange = 0endifendifREM CHECK CONTROL TIMEstarttime = 075500endtime = 075900REM RANGE ESTABLISHMENTIF time >= starttime and time <= endtime thenREM NIGHT MAXmaximo = dhigh(0)REM NIGHT MINminimo = dlow(0)REM RANGE IN PIPS BETWEEN NIGHT MAX AND MINrangepips = round(maximo-minimo)REM PROFIT IN PIPS EXprofitrange = rangepips*profitrangevalue// i.e we could add here "*0.9" to reduce the profit objective//profittrend = rangepips*profittrendvalue //1.5REM DISTANCE FROM LINES TO SET ORDERSmargin = rangepips*rangepercentREM SET MAX ORDER PLACESabovemax = maximo+marginbelowmax = maximo-marginREM SET MIN ORDER PLACESabovemin = minimo+marginbelowmin = minimo-marginREM SET NUMBER OF PIPS TO RISK EACH TRADEStopLoss = round(margin*2)if StopLoss<6 thenStopLoss = 6endifendifREM Calculate contractsequity = Capital + StrategyProfitmaxrisk = round(equity*(Risk/100))PositionSize = abs(round((maxrisk/StopLoss)/PointValue)*pipsize)REM SPREAD CHECKIF Time>=090000 and time<173000 thenspread = 0 // Backtest spread is set to 1elsespread = 1 // Backtest spread 1 + 1 = Real spreadendifREM CONDICION DEL MERCADOinrange = Close<maximo-margin and close>minimo+marginbullish = Close>(maximo+margin)bearish = Close<(minimo-margin)semibull = Close>maximo-margin and close<maximo+marginsemibear = close<minimo+margin and close>minimo-marginREM START SETTING ORDERSREM FIRST TRADESif not onmarket and trading = 1 and rangepips<=maxrange and rangepips>=minrange thenREM RESET VARIABLES EACH TIME WE ARE OUT OF THE MARKETif bearish thenif enter4=0 thensellshort PositionSize contract at market//belowmin limitendifif enter1=0 thenbuy PositionSize contract at abovemin+spread stopendifendifif bullish thenif enter3=0 thenbuy PositionSize contract at market//abovemax limitendifif enter2=0 thensellshort PositionSize contract at belowmax-spread stopendifendifif inrange thenif enter1=0 thenbuy PositionSize contract at abovemin limitendifif enter2=0 thensellshort PositionSize contract at belowmax limitendifif enter3=0 thenbuy PositionSize contract at abovemax+spread stopendifif enter4=0 thensellshort PositionSize contract at belowmin-spread stopendifendifif semibull thenif enter3=0 thenbuy PositionSize contract at abovemax+spread stopendifif enter2=0 thensellshort PositionSize contract at belowmax-spread stopendifendifif semibear thenif enter1=0 thenbuy PositionSize contract at abovemin+spread stopendifif enter4=0 thensellshort PositionSize contract at belowmin-spread stopendifendifendifbuytrend = tradeprice(1)>maximobuyrange = tradeprice(1)<maximoselltrend = tradeprice(1)<minimosellrange = tradeprice(1)>minimoREM SI ESTAMOS LARGOSif longonmarket thenREM IF TRADE PRICE IS ABOVE MAXif buytrend thenenter3 = 1if enter2=0 thensellshort PositionSize contract at belowmax-spread stopendifendifREM IF TRADE PRICE IS INTO DE RANGEif buyrange thenenter1 = 1if enter4=0 thensellshort PositionSize contract at belowmin-spread stopendifendifendifREM SI ESTAMOS CORTOSif shortonmarket thenREM SI HEMOS VENDIDO POR DEBAJO DEL MINIMOif selltrend thenenter4 = 1if enter1=0 thenbuy PositionSize contract at abovemin+spread stopendifendifREM SI HEMOS VENDIDO DENTRO DEL RANGOif sellrange thenenter2 = 1if enter3=0 thenbuy PositionSize contract at abovemax+spread stopendifendifendifset stop ploss stoplossset target pprofit profitrange -
AuthorPosts
Find exclusive trading pro-tools on