New version of Binomio AutoTrading
Forums › ProRealTime English forum › ProOrder support › New version of Binomio AutoTrading
- This topic has 2 replies, 3 voices, and was last updated 4 years ago by winnie37.
Viewing 3 posts - 1 through 3 (of 3 total)
-
-
07/10/2019 at 7:31 PM #102402
Hi all,
I check this strategy very interesting but I found some errors when I tried it in REAL with IG. For that, I modify it but I would like to check with 200k bars. Could you please help me?
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224//-------------------------------------------------------------------------// Main code : Binomio AutoTrading Bot v.3 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 = 1.8profitrangevalue = profittrendvalue//5 //1.7rangepercent = 0.1//0.1REM ######################REM ## MONEY MANAGEMENT ##REM ######################Capital = 6000Risk = 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 abs(close - abovemax)<= 10 thenigabovemax = abs(close - abovemax)+1elseigabovemax = 0endifif abs(close - abovemin)<= 10 thenigabovemin = abs(close - abovemin)+1elseigabovemin = 0endifif abs(close - belowmax)<= 10 thenigbelowmax = abs(close - belowmax)+1elseigbelowmax = 0endifif abs(close - belowmin)<= 10 thenigbelowmin = abs(close - belowmin)+1elseigbelowmin = 0endifif 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+igabovemin stopendifendifif bullish thenif enter3=0 thenbuy PositionSize contract at market//abovemax limitendifif enter2=0 thensellshort PositionSize contract at belowmax-spread-igbelowmax 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+igabovemax stopendifif enter4=0 thensellshort PositionSize contract at belowmin-spread-igbelowmin stopendifendifif semibull thenif enter3=0 thenbuy PositionSize contract at abovemax+spread+igbelowmin stopendifif enter2=0 thensellshort PositionSize contract at belowmax-spread-igbelowmax stopendifendifif semibear thenif enter1=0 thenbuy PositionSize contract at abovemin+spread+igabovemin stopendifif enter4=0 thensellshort PositionSize contract at belowmin-spread-igbelowmin 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-igbelowmax stopendifendifREM IF TRADE PRICE IS INTO DE RANGEif buyrange thenenter1 = 1if enter4=0 thensellshort PositionSize contract at belowmin-spread-igbelowmin stopendifendifendifREM SI ESTAMOS CORTOSif shortonmarket thenREM SI HEMOS VENDIDO POR DEBAJO DEL MINIMOif selltrend thenenter4 = 1if enter1=0 thenbuy PositionSize contract at abovemin+spread+igabovemin stopendifendifREM SI HEMOS VENDIDO DENTRO DEL RANGOif sellrange thenenter2 = 1if enter3=0 thenbuy PositionSize contract at abovemax+spread+igabovemax stopendifendifendifset stop ploss stoplossset target pprofit profitrange07/14/2019 at 2:48 AM #10254007/16/2019 at 3:06 PM #102674 -
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
Find exclusive trading pro-tools on
Similar topics: