Candlestick Scalper 1s discussion
Forums › ProRealTime English forum › ProOrder support › Candlestick Scalper 1s discussion
- This topic has 171 replies, 16 voices, and was last updated 2 years ago by CMM.
-
-
08/24/2020 at 8:03 PM #142471
hello Philstrading or Grahal, can you make it work for eur/usd mini or gold? low spread for me….in all case thank you!
08/24/2020 at 8:40 PM #142473This is going to bed till weekend now. final punt for the day is to increase the c21m to 16 or 17, change the trail to 28 with a 7 step and lose all the stopouts… less trades but no stopouts in 6 months. It has some significant drawdowns during trade mind but retains good gains and no losses.,
Results are swings and roundabouts, but for me the same return with no stopouts is preferable, albeit you can increase the return with a dropout, lower value accounts can manage better.
For me looking at this you can risk 20p per pip, risk 6% on account and gain about 80% a year with 20p per pip per £1K…
Risking 1% of account gives abut 26% I assume, and 2% about 53% per £1K but with no stopouts in last 6 mnths being risk free it could soon be built up without risking capital….
No stopouts in 6 months12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182// Main code : Grahal 1 min test code timed//-------------------------------------------------------------------------Defparam cumulateorders = falsetd1 = 1 AND OpenDayOfWeek = 1 AND OpenTime >= 070000 AND OpenTime <= 205500 //Mondaytd2 = 1 AND OpenDayOfWeek = 2 AND OpenTime >= 070000 AND OpenTime <= 205500 //Tuesdaytd3 = 1 AND OpenDayOfWeek = 3 AND OpenTime >= 070000 AND OpenTime <= 205500 //Wednesdaytd4 = 1 AND OpenDayOfWeek = 4 AND OpenTime >= 070000 AND OpenTime <= 205500 //Thursdaytd5 = 1 AND OpenDayOfWeek = 5 AND OpenTime >= 070000 AND OpenTime <= 205500 //FridaytdCond = td1 OR td2 OR td3 OR td4 OR td5//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Code principal : CANDLE//-------------------------------------------------------------------------n = 1timeframe(15 minute,updateonclose)c160m = open > open[1] and close > close[1] and close > opentimeframe(1 minute,updateonclose)c11m = open > open[1] and close > close[1]c21m = abs(close-open) >=16c31m = abs(close[1]-open[1])c41m = c31m > c21mtimeframe(default)c1def = open > open[1] and close > close[1]c2def = abs(close-open) >= 1IF not longonmarket and c1def and c11m and c21m and c41m and c2def and c1def and c160m and Close crosses over Supertrend[12,4] and tdcond thenBUY N contracts at marketset stop ploss 300ENDIF//if Summation[A29](Open - Close) > B29 then//sell at market//endif//************************************************************************//trailing stop functiontrailingstart = 28 //A35 //19 //trailing will start @trailinstart points profittrailingstep = 7 //A36 // 7 //trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THENnewSL = tradeprice(1)-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF1 user thanked author for this post.
08/24/2020 at 8:43 PM #142475hello Philstrading or Grahal, can you make it work for eur/usd mini or gold? low spread for me….in all case thank you!
Your risk profile is paramount when deciding on strategy. What sort of risk profile do u have i.e max you wan tto risk stopin gout as that can vary from person to person based on emotional influences as well as capital. It can effect how a strategy is structured IMHO…
08/25/2020 at 12:27 PM #142505@Philstrading I note that you have changed Makside to GraHal on your System titles.
It’s only right that we keep / give Makside the credit in the title.
08/25/2020 at 12:30 PM #142506i’m in the process of reworking the strategy with half pivots points. It looks promising.
for example, between both daily pivot, from a certain percentage above pivot (different value following the pivots PP,Rx,Sx), in bullish/bearish profile, we are sure to get few points when price crosses over/under the half pivot.
i’m coming back as soon as my cash machine works 😉
2 users thanked author for this post.
08/25/2020 at 12:59 PM #142511here’s a try on eurusd
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200//-------------------------------------------------------------------------// Main code : Makside DJI M1 v1//-------------------------------------------------------------------------// Adjusted to EURUSD , 0,9 pip spread, 1m, v1p//-------------------------------------------------------------------------// Code principal : CANDLE//-------------------------------------------------------------------------defparam cumulateorders = falsedefparam preloadbars = 2000once tradetype = 1 //1LS 2L 3Sonce reenter = 0 //1ONonce positionperftype = 1 //0LG 1L 2Gonce positionperfvalue = 0.05 //%once positionsize = 1once stochasticrsi = 1once closetime=225500once sl=1once pt=0.5once overnightposition = 1once weekendposition = 0ctime = 1 //hour>=8 and hour<22timeframe(15 minute,updateonclose)c160m = open > open[1] and close > close[1] and close > opentimeframe(default)c11m = open > open[1] and close > close[1]c21m = abs(close[0]-open[0])>(close/10000)*1.4c31m = abs(close[1]-open[1])c41m = c31m > (c21m/10000)c3def = Supertrend[6,1]condbuy = c11m and c21m and c41m and c160mcondbuy = condbuy and close > c3def//Stochastic RSI | indicatorif stochasticrsi thenlengthRSI = 4 //RSI periodlengthStoch = 6 //Stochastic periodsmoothK = 2 //Smooth signal of stochastic RSIsmoothD = 6 //Smooth signal of smoothed stochastic RSImyRSI = RSI[lengthRSI](totalprice)MinRSI = lowest[lengthStoch](myrsi)MaxRSI = highest[lengthStoch](myrsi)StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)K = average[smoothK](stochrsi)*100D = average[smoothD](K)c13 = K>Dcondbuy = condbuy and c13 and not c13[1]endifcondsell=0// entry criteriaif ctime thenif (tradetype=1 or tradetype=2) thenif condbuy and not longonmarket thenbuy positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=2 thenset stop %loss slset target %profit ptendifendifendifif (tradetype=1 or tradetype=3) thenif condsell and not shortonmarket thensellshort positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=3 thenset stop %loss slset target %profit ptendifendifendifif reenter thenif positionperftype=1 thenpositionperformance=positionperf(0)*100<-positionperfvalueelsif positionperftype=2 thenpositionperformance=positionperf(0)*100>positionperfvalueelsepositionperformance=((positionperf(0)*100)<-positionperfvalue or (positionperf(0)*100)>positionperfvalue)endifif (tradetype=1 or tradetype=2) thenif condbuy and longonmarket and positionperformance thensell at marketendifif condbuy[1] and not longonmarket thenbuy positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=2 thenset stop %loss slset target %profit ptendifendifendifif (tradetype=1 or tradetype=3) thenif condsell and shortonmarket and positionperformance thenexitshort at marketendifif condsell[1] and not shortonmarket thensellshort positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=3 thenset stop %loss slset target %profit ptendifendifendifendifelseif longonmarket and condsell then//sell at marketendifif shortonmarket and condbuy then//exitshort at marketendifendif/// trailing stop percentageonce trailingstoptype=1if trailingstoptype thenonce trailingpercent = 0.165once steppercent = (trailingpercent/10)*1if onmarket thentrailingstart = tradeprice(1)*(trailingpercent/100)trailingstep = tradeprice(1)*(steppercent/100)endifif not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) thennewsl=0endifif longonmarket thenif newsl=0 and low-tradeprice(1)>=trailingstart thennewsl = tradeprice(1)+trailingstependifif newsl>0 and low-newsl>trailingstep thennewsl = newsl+trailingstependifendifif shortonmarket thenif newsl=0 and tradeprice(1)-high>=trailingstart thennewsl = tradeprice(1)-trailingstependifif newsl>0 and newsl-high>trailingstep thennewsl = newsl-trailingstependifendifif longonmarket thenif newsl>0 thensell at newsl stopendifif newsl>0 thenif low crosses under newsl thensell at marketendifendifendifif shortonmarket thenif newsl>0 thenexitshort at newsl stopendifif newsl>0 thenif high crosses over newsl thenexitshort at marketendifendifendifendifif not overnightposition thenif time>=closetime thensell at marketexitshort at marketendifendifif not weekendposition thenif (dayofweek=5 and time>=closetime) thenexitshort at marketsell at marketendifendifit’s created on 100k bars which look oke, but 200k bars it not good.
4 users thanked author for this post.
08/25/2020 at 1:35 PM #142517@Philstrading I note that you have changed Makside to GraHal on your System titles.
It’s only right that we keep / give Makside the credit in the title.
Fair point, I think it was because the itf file I thought came from you, so its just up on my system for reference, but yeh sure, I’ll be sure to retain the originator in future…
2 users thanked author for this post.
08/25/2020 at 2:39 PM #142525Just a brief observation of TP v Trail.
A TP of 28 gives a more averaged monthly/weekly return. Depends on preferences, TP here was set to 28 the original trail start. Something to look at for more averaged monthly /weekly returns rather than rely on disproportionate runs…
Pics attached
Noticed name not changed there, I’ll do now..
1 user thanked author for this post.
08/25/2020 at 2:42 PM #142528here’s a try on eurusd
it’s created on 100k bars which look oke, but 200k bars it not good.
€/$ had a long ride down and it found only in the last few months the way to go up. And this stragedy is only for long trades profitable, so in short trends it works not fine. Is it possible to create a version for short?
08/25/2020 at 4:18 PM #142532here’s both in one code
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215//-------------------------------------------------------------------------// Main code : Makside DJI M1 v1//-------------------------------------------------------------------------// Adjusted to EURUSD , 0,9 pip spread, 1m, v2p//-------------------------------------------------------------------------// Code principal : CANDLE//-------------------------------------------------------------------------defparam cumulateorders = falsedefparam preloadbars = 2000once tradetype = 2 //1LS 2L 3Sonce reenter = 1 //1ONonce positionperftype = 1 //0LG 1L 2Gonce positionperfvalue = 0.05 //%once positionsize = 1once stochasticrsi = 1once st = 1once closetime=225500once sl=1once pt=0.5once overnightposition = 1once weekendposition = 0ctime = 1 //hour>=8 and hour<22timeframe(15 minute,updateonclose)//longc160m = open > open[1] and close > close[1] and close > open//shortc160s = open < open[1] and close < close[1] and close < opentimeframe(default)//longc11m = open > open[1] and close > close[1]c21m = abs(close[0]-open[0])>(close/10000)*2c31m = abs(close[1]-open[1])c41m = c31m > (c21m/10000)//shortc11s = open < open[1] and close < close[1]c21s = abs(close[0]-open[0])>(close/10000)*1.4c31s = abs(close[1]-open[1])c41s = c31s > (c21s/10000)condbuy = c11m and c21m and c41m and c160mcondsell= c11s and c21s and c41s and c160sif st=1 thenc3def = Supertrend[2,12]condbuy = condbuy and close > c3defcondsell= condsell and close < c3defendif//Stochastic RSI | indicatorif stochasticrsi thenlengthRSI = 2 //RSI periodlengthStoch = 4 //Stochastic periodsmoothK = 6 //Smooth signal of stochastic RSIsmoothD = 6 //Smooth signal of smoothed stochastic RSImyRSI = RSI[lengthRSI](totalprice)MinRSI = lowest[lengthStoch](myrsi)MaxRSI = highest[lengthStoch](myrsi)StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)K = average[smoothK](stochrsi)*100D = average[smoothD](K)c13 = K>Dc14 = K<Dcondbuy = condbuy and c13 and not c13[1]condsell = condsell and c14 and not c14[1]endif// entry criteriaif ctime thenif (tradetype=1 or tradetype=2) thenif condbuy and not longonmarket thenbuy positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=2 thenset stop %loss slset target %profit ptendifendifendifif (tradetype=1 or tradetype=3) thenif condsell and not shortonmarket thensellshort positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=3 thenset stop %loss slset target %profit ptendifendifendifif reenter thenif positionperftype=1 thenpositionperformance=positionperf(0)*100<-positionperfvalueelsif positionperftype=2 thenpositionperformance=positionperf(0)*100>positionperfvalueelsepositionperformance=((positionperf(0)*100)<-positionperfvalue or (positionperf(0)*100)>positionperfvalue)endifif (tradetype=1 or tradetype=2) thenif condbuy and longonmarket and positionperformance thensell at marketendifif condbuy[1] and not longonmarket thenbuy positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=2 thenset stop %loss slset target %profit ptendifendifendifif (tradetype=1 or tradetype=3) thenif condsell and shortonmarket and positionperformance thenexitshort at marketendifif condsell[1] and not shortonmarket thensellshort positionsize contract at marketif tradetype=1 thenset stop %loss slset target %profit ptelsif tradetype=3 thenset stop %loss slset target %profit ptendifendifendifendifelseif longonmarket and condsell then//sell at marketendifif shortonmarket and condbuy then//exitshort at marketendifendif/// trailing stop percentageonce trailingstoptype=1if trailingstoptype thenonce trailingpercent = 0.165once steppercent = (trailingpercent/10)*1if onmarket thentrailingstart = tradeprice(1)*(trailingpercent/100)trailingstep = tradeprice(1)*(steppercent/100)endifif not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) thennewsl=0endifif longonmarket thenif newsl=0 and low-tradeprice(1)>=trailingstart thennewsl = tradeprice(1)+trailingstependifif newsl>0 and low-newsl>trailingstep thennewsl = newsl+trailingstependifendifif shortonmarket thenif newsl=0 and tradeprice(1)-high>=trailingstart thennewsl = tradeprice(1)-trailingstependifif newsl>0 and newsl-high>trailingstep thennewsl = newsl-trailingstependifendifif longonmarket thenif newsl>0 thensell at newsl stopendifif newsl>0 thenif low crosses under newsl thensell at marketendifendifendifif shortonmarket thenif newsl>0 thenexitshort at newsl stopendifif newsl>0 thenif high crosses over newsl thenexitshort at marketendifendifendifendifif not overnightposition thenif time>=closetime thensell at marketexitshort at marketendifendifif not weekendposition thenif (dayofweek=5 and time>=closetime) thenexitshort at marketsell at marketendifendif3 users thanked author for this post.
08/25/2020 at 8:39 PM #142552Paul, your positionsize in your result seems to be 10 and not only 1, which is in yr screenshot shown. My result is a little bit smaller. 😀
08/26/2020 at 3:46 PM #142623Yeah on eurusd mini the results don’t look too impressive. I’am putting this on hold atm.
1 user thanked author for this post.
08/28/2020 at 12:06 PM #142815I find programs need a reasonable run for robustness, I’d probably say 3 months as in my experience an unproven program can do well in a month and lose everything the next month even if OK in backtesting, so 3 months I’m currently gauging as a rule stick. I’ll put up how its doing more frequently though, probably at end of month.
Shorts I currently found only worked with a lot of restriciton, haven’t put up the eurusd one yet though.. I put one up live on minimal trade which is well within my 1% tolerance for a few drops using th e100% gain version with no losses.. Due to program and server anomalies I also usually only start with partial risk an dincrease once profits allow a buffer, the nif it loses and proves unfruitful its easy to use discretionary trading to buffer lossses of unproven programs..
So I’ll put up monthly anyway…
Currently the 1 minutes code ran on the 1second timeframe (the chaos one) is well ahead, followed by the 1second one however the chaosprogram is currently trading so see how it pans out…. Monthly I think a reasonable update over a 3 month period2 users thanked author for this post.
08/28/2020 at 1:55 PM #142827Shorts I currently found only worked with a lot of restriciton
Hello Phil!
Very interesting to follow the progress of this algo!Do you mean that you have made a short version of this? It would be most appreciated if you could post it here! Unfortunatly i´m not capable of doing it myself (yet).
08/28/2020 at 2:09 PM #142829Re Shorts
I find the losses in the program a bit excessive and taking profit at 28 can yield as much as the runs with losses but yield no losses with a TP and altered parameters. The short version for the same code exactly was a bit excessive with losses, I think I altered some parameters and filters which yielded few but successful shorts with no losses. New coding for weekends really unless I need to side-track myself..
The no losses was the 1 minute version with a c21m of >=16 or 17 with a TP of 28 – stoploss as normal. Time limit of 0700 to 2055 if I recall correctly. I’ve got that on a minimal trade live with fractional percentage stoploss so iget some pennies if it runs ok an dcan start to build up the risk free trading..
-
AuthorPosts
Find exclusive trading pro-tools on