Long/Short Waves trading system
Forums › ProRealTime English forum › ProOrder support › Long/Short Waves trading system
- This topic has 22 replies, 9 voices, and was last updated 3 years ago by nepu77.
-
-
03/25/2020 at 9:45 AM #123100
THE INDICATOR IS A LONG SHORT SYSTEM FOR EVERY MARKET.
I USE THIS FOR THE TRADING SYSTEM:
12345678910111213141516// Festlegen der Code-ParameterDEFPARAM CumulateOrders = False // Kumulieren von Positionen deaktiviert// Bedingungen zum Einstieg in Long-Positionenindicator1, ignored = CALL WAVEc1 = (indicator1 >= 1)IF c1 THENBUY 1 SHARES AT MARKETENDIF// Bedingungen zum Einstieg in Short-Positionenignored, indicator2 = CALL WAVEc2 = (indicator2 <= -1)IF c2 THENSELLSHORT 1 SHARES AT MARKETENDIF// Stops und TargetsSET STOP %TRAILING 0.51 user thanked author for this post.
03/25/2020 at 9:52 AM #123233Hi nepu77, thanks for sharing your trading strategy code with us, this is very kind of you. I moved it from the pending post of the library to the forum because the code of indicator is not open source. If you don’t want to share the code, that’s not a problem for me, but it could be interesting to know how it is functioning in order to detect the waves you are using in order to enter the market. Thanks again.
03/25/2020 at 10:14 AM #123244Do you have any back tests with tick by tick data?
1 user thanked author for this post.
03/25/2020 at 10:30 AM #123249It is ok for me the share also the Code. I Need a bit help and I have now no Ideas to get it profitable. By Tickdata it does not work, but it Shows me it could be very interessting System.
this is the Code:
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418//COPYRIGHT ® BY JÜRGEN STRASSER; http://WWW.FUTURES-TRADING.INFOonce bars = 1once block = 1if barindex >= block11 + block thenblock11 = 0endifif currentyear >=2021 and currentmonth >=01 thenabschaltung = 1endifif barindex >= MyIndex + bars thenMyLimitBuy = 0endif//////////////////////////////////////c2 = (close[2]>open[2])[0]c3 = close[1]<=open[1]c5 = highest[2](high)Newlow=10000000FOR a111 = 0 TO 4 DOIF low[a111]<Newlow THENNewlow = low[a111]ENDIFNEXTc7 = c5[1]<highc10 = Newlow<low[1] and Newlow<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and c2 and c3 and c7 and c10)[0] thenindi = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi = 0endifa1 = (close[3]>open[3])[0]a2 = close[2]<=open[2]a5 = highest[3](high)Newlow2=10000000FOR a222 = 0 TO 5 DOIF low[a222]<Newlow2 THENNewlow2 = low[a222]ENDIFNEXTa7 = a5[1]<higha10 = Newlow2<low[2] and Newlow2<low[1] and Newlow2<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and a1 and a2 and a7 and a10 )[0] thenindi2 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi2 = 0endifb1 = (close[4]>open[4])[0]b2 = close[3]<=open[3]b6 = highest[4](high)Newlow3=10000000FOR a333 = 0 TO 6 DOIF low[a333]<Newlow3 THENNewlow3 = low[a333]ENDIFNEXTb8 = b6[1]<highb12 = Newlow3< low[3] and Newlow3<low[2] and Newlow3<low[1] and Newlow3<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and b1 and b2 and b8 and b12 )[0] thenindi3 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi3 = 0endifg1 = close[5]>open[5]g2 = close[4]<=open[4]g7 = highest[5](high)Newlow4=10000000FOR a444 = 0 TO 7 DOIF low[a444]<Newlow4 THENNewlow4 = low[a444]ENDIFNEXTg9 = g7[1]<highg12 = Newlow4<low[4] and Newlow4<low[3] and Newlow4<low[2] and Newlow4<low[1] and Newlow4<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and g1 and g2 and g9 and g12 )[0] thenindi7 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi7 = 0endifh1 = (close[6]>open[6])[0]h2 = close[5]<=open[5]h8 = highest[6](high)Newlow5=10000000FOR a555 = 0 TO 8 DOIF low[a555]<Newlow5 THENNewlow5 = low[a555]ENDIFNEXTh10 = h8[1]<highh13 =Newlow5<low[5] and Newlow5<low[4] and Newlow5<low[3] and Newlow5<low[2] and Newlow5<low[1] and Newlow5<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and h1 and h2 and h10 and h13 )[0] thenindi8 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi8 = 0endifj1 = (close[7]>open[7])[0]j2 = close[6]<=open[6]Newlow6=10000000FOR a666 = 0 TO 9 DOIF low[a666]<Newlow6 THENNewlow6 = low[a666]ENDIFNEXTj8 = highest[7](high)j10 = j8[1]<highj13 = Newlow6<low[6] and Newlow6<low[5] and Newlow6<low[4] and Newlow6<low[3] and Newlow6<low[2] and Newlow6<low[1] and Newlow6<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and j1 and j2 and j10 and j13 )[0] thenindi9 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi9 = 0endifn1 = (close[8]>open[8])[0]n2 = close[7]<=open[7]n8 = highest[8](high)Newlow7=10000000FOR a777 = 0 TO 10 DOIF low[a777]<Newlow7 THENNewlow7 = low[a777]ENDIFNEXTn10 = n8[1]<highn13 = Newlow7<low[7] and Newlow7<low[6] and Newlow7<low[5] and Newlow7<low[4] and Newlow7<low[3] and Newlow7<low[2] and Newlow7<low[1] and Newlow7<low[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and n1 and n2 and n10 and n13 )[0] thenindi10 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelseindi10 = 0endif//return indi as “3er”, indi2 as “3er-2″, indi3 as”3er-3”, indi7 as “3er-4”, indi8 as “3er-5”, indi9 as “3er-6”, indi10 as “3er-7”////////////////////////////////////////////////hc2 = (close[2]<open[2])[0]hc3 = close[1]>=open[1]hc5 = lowest[2](low)Newhighest=0FOR ha111 = 0 TO 4 DOIF High[ha111]>Newhighest THENNewhighest = High[ha111]ENDIFNEXThc7 = hc5[1]>lowhc10 = Newhighest>high[0]and Newhighest>high[1]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and hc2 and hc3 and hc7 and hc10 )[0] thenhindi = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi = 0endifha1 = (close[3]<open[3])[0]ha2 = close[2]>=open[2]ha5 = lowest[3](low)Newhighest2=0FOR ha222 = 0 TO 5 DOIF High[ha222]>Newhighest2 THENNewhighest2 = High[ha222]ENDIFNEXTha7 = ha5[1]>lowha10 = high[2]<Newhighest2 and high[1]<Newhighest2 and high[0]<Newhighest2if block11 < 1 and abschaltung = 0 and( MyLimitBuy <1 and ha1 and ha2 and ha7 and ha10 )[0] thenhindi2 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi2 = 0endifhb1 = (close[4]<open[4])[0]hb2 = close[3]>=open[3]hb6 = lowest[4](low)hb8 =hb6[1]>lowNewhighest3=0FOR ha333 = 0 TO 6 DOIF High[ha333]>Newhighest3 THENNewhighest3 = High[ha333]ENDIFNEXThb11 = Newhighest3>high[3] and Newhighest3>high[2] and Newhighest3>high[1] and Newhighest3>high[0]if block11 < 1 and abschaltung = 0 and (MyLimitBuy <1 and hb1 and hb2 and hb8 and hb11)[0] thenhindi3 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi3 = 0endifhg1 = (close[5]<open[5])[0]hg2 = close[4]>=open[4]hg7 = lowest[5](low)hg9 = hg7[1]>lowNewhighest4=0FOR ha444 = 0 TO 7 DOIF High[ha444]>Newhighest4 THENNewhighest4 = High[ha444]ENDIFNEXThg12 = Newhighest4>high[4] and Newhighest4>high[3] and Newhighest4>high[2] and Newhighest4>high[1] and Newhighest4>high[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and hg1 and hg2 and hg9 and hg12 )[0] thenhindi7 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi7 = 0endifhh1 = (close[6]<open[6])[0]hh2 = close[5]>=open[5]hh8 = lowest[6](low)Newhighest5=0FOR ha555 = 0 TO 8 DOIF High[ha555]>Newhighest5 THENNewhighest5 = High[ha555]ENDIFNEXThh10 = hh8[1]>lowhh13 = Newhighest5>high[5] and Newhighest5>high[4] and Newhighest5>high[3] and Newhighest5>high[2] and Newhighest5>high[1] and Newhighest5>high[0]if block11 < 1 and abschaltung = 0 and (MyLimitBuy <1 and hh1 and hh2 and hh10 and hh13 )[0] thenhindi8 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi8 = 0endifhi1 = (close[7]<open[7])[0]hi2 = close[6]>=open[6]hi8 = lowest[7](low)Newhighest6=0FOR ha666 = 0 TO 9 DOIF High[ha666]>Newhighest6 THENNewhighest6 = High[ha666]ENDIFNEXThi10 = hi8[1]>lowhi13 = Newhighest6>high[6] and Newhighest6>high[5] and Newhighest6>high[4] and Newhighest6>high[3] and Newhighest6>high[2] and Newhighest6>high[1] and Newhighest6>high[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and hi1 and hi2 and hi10 and hi13 )[0] thenhindi9 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi9 = 0endifhj1 = (close[8]<open[8])[0]hj2 = close[7]>=open[7]hj9 = lowest[8](low)Newhighest7=0FOR ha777 = 0 TO 10 DOIF High[ha777]>Newhighest7 THENNewhighest7 = High[ha777]ENDIFNEXThj11 = hj9[1]>lowhj13 = Newhighest7>high[7] and Newhighest7>high[6] and Newhighest7>high[5] and Newhighest7>high[4] and Newhighest7>high[3] and Newhighest7>high[2] and Newhighest7>high[1] and Newhighest7>high[0]if block11 < 1 and abschaltung = 0 and ( MyLimitBuy <1 and hj1 and hj2 and hj11 and hj13 )[0] thenhindi10 = 1MyLimitBuy = closeMyIndex = barindexblock11 = barindexelsehindi10 = 0endif//return indi as “3er”, indi2 as “3er-2″, indi3 as”3er-3”, indi7 as “3er-4”, indi8 as “3er-5″, indi9 as”3er-6”, indi10 as “3er-7”if abschaltung = 0 and timer1 = 1 and longindex >=1 and close[2]<open[2] and close[1]>open[1] thenall = lowest[3](low)endifif abschaltung = 0 and timer1 = 1 and shortindex >=1 and close[2]>open[2] and close[1]<open[1] thenal2 = highest[3](high)endifif barindex >= timer + 3 thentimer1 = 1endifonce longindex =0once shortindex =0once barslong = 50000once barsshort = 50000if not shortindex >=1 and abschaltung = 0 and (hindi=1 OR hindi10=1 OR hindi2=1 OR hindi3=1 OR hindi7=1 OR hindi8=1 OR hindi9=1 ) thentimer1 = 0timer = barindexal2 = highest[10](high)shortindex = Barindexlongindex = 0pause = 0endifif shortindex >=1 and CLOSE>al2[0] and not longindex >=1and abschaltung = 0 thenshortindex = 0pause = 1endifIF BarIndex >= shortindex + barsshort THENshortindex = 0ENDIFif not longindex >=1 and abschaltung = 0 and (indi=1 OR indi2=1 OR indi3=1 OR indi7=1 OR indi8=1 OR indi9=1 OR indi10=1) thentimer1 = 0timer = barindexall = lowest[10](low)longindex = Barindexshortindex = 0pause = 0endifif longindex >=1 and CLOSE<all[0] and not shortindex >=1and abschaltung = 0 thenlongindex =0pause = 1endifIF BarIndex >= longindex + barslong THENlongindex = 0ENDIFvc3 = highest[10](high)vc4 = lowest[10](low)if pause = 1 and vc3[1]<high and abschaltung = 0 thentimer1 = 0timer = barindexlongindex = barindexall = lowest[5](low)shortindex = 0pause = 0endifif pause = 1 and vc4[1]>low and abschaltung = 0 thentimer1 = 0timer = barindexshortindex = barindexal2 = highest[5](high)longindex = 0pause = 0endifif not longindex >=1 and shortindex >=1 and high>vc3[1] and abschaltung = 0 thentimer1 = 0timer = barindexlongindex = barindexshortindex = 0all = lowest[10](low)pause = 0endifif not shortindex >=1 and longindex >=1 and low<vc4[1] and abschaltung = 0 thentimer1 = 0timer = barindexshortindex = barindexlongindex = 0al2 = highest[10](high)pause = 0endifif longindex >=1 and abschaltung = 0 thenlong =1endifif longindex=0 and abschaltung = 0 thenlong =0endifif shortindex >=1 and abschaltung = 0 thenshort = -1endifif shortindex =0 and abschaltung = 0 thenshort = 0endifif long = 1 and abschaltung = 0 thenBACKGROUNDCOLOR (255,255,0,25)drawtext(“▪”,barindex,all[0],dialog,standard,10) coloured(255,0,0,50)endifif short = -1 and abschaltung = 0 thenBACKGROUNDCOLOR (255,0,0,25)drawtext(“▪”,barindex,al2[0],dialog,standard,10) coloured(255,0,0,50)endifreturn long as “long”, short as “short”03/25/2020 at 11:26 AM #123258>> For clarity of messages on ProRealCode’s forums, please use the “insert code PRT” button to separate the text of the code part! Thank you! <<
🙂03/25/2020 at 1:49 PM #123273it does not work
You know it’s an Indicator right? Not an Auto-System?
Anyway attached is the code working as an Auto-System with results attached .
Spread = 2 so it would not make any money currently (without changes) as spread = 10 ish on the DJI.
03/25/2020 at 2:49 PM #12328103/25/2020 at 3:20 PM #123285Thank you very much for the concept Nepu. Be careful, as pointed out Nonetheless, your backtest is not in tick by tick. Attached is the backtest of your initial strategy on Dax in daily.
Sorry, my mistake, you were on the DJ, which is much better. Attached in tick by tick
03/25/2020 at 4:10 PM #123288Attached in tick by tick
Are we all talking about the Long / Short Waves Systems here or what?? 🙂
03/25/2020 at 5:06 PM #12329503/25/2020 at 5:37 PM #123297The System I have written Comes from Elliottwave or in Germany there is “Markttechnik” but with new Ideas.
When you use the 1 Day Chart, you have on every Market 80% of the Day-Range. This is a Backtest with 0.5% Takeprofit.
I think that´s very very good. But it is Nothing to earn Money and that´s not what i can understand.
So I think we only Need a good way for Stops
03/25/2020 at 5:53 PM #12329903/25/2020 at 5:58 PM #12330103/26/2020 at 10:55 AM #123372I have managed to backtest by tick by tick mode, only from August 2018 to today.
Before August 2018 there must be some “data holes” that generate errors…
Here is the result attached. I modified the trailing stop to 0.25%
Basically it takes position every night and cut the loss very quickly. I dont know what to think.
@nepu77 did you create the code for the indicator yourself ?
03/26/2020 at 11:08 AM #123376 -
AuthorPosts
Find exclusive trading pro-tools on