Need help for a renko based strategy (Nicholas i need u)
Forums › ProRealTime English forum › ProOrder support › Need help for a renko based strategy (Nicholas i need u)
- This topic has 4 replies, 3 voices, and was last updated 7 years ago by Nicolas.
-
-
08/17/2017 at 2:50 PM #44118
I wrote a code to trade renko pullbacks in the daily chart, but it doesn’t function, someone can please help? I know the code is realy rude but it’s the first time for me to coding, be patient to understand it.
Renko trend follower - here's the code123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149renkoboxsize = 0.0085 // DIMENSIONE COSTANTE IN PIPS DEL BOX RENKOcount = 0i = 0boxes1 = 0boxes2 = 0actualbox = 0// Controlliamo se il box attuale è verde o rossoWHILE (count = 0)sum = close[i] - close[i + 1] + sumIF sum >= renkoboxsize THENactualbox = 1 // Il box attuale è verdeboxes1 = boxes1 + 1count = 1ELSEIF sum <= renkoboxsize * -1 THENactualbox = 2 // Il box attuale è rossoboxes1 = boxes1 + 1count = 1ENDIFENDIFi = i + 1WENDsum = 0count = 0// Il box precedente a quello attuale deve essere di colore opposto, verifichiamolo:WHILE (count = 0 )sum = close[i] - close[i + 1] + sumIF sum >= renkoboxsize * 2 AND actualbox = 2 THENverify = 2 // Il trend deve essere negativoboxes1 = boxes1 + 1count = 1ELSEIF sum <= renkoboxsize * -2 AND actualbox = 1 THENverify = 1 // Il trend deve essere positivoboxes1 = boxes1 + 1count = 1ENDIFENDIFi = i + 1WENDsum = 0count = 0// Ora dobbiamo andare a ritroso per verificare in che trend ci troviamoif verify = 1 THENWhile count = 0sum = close[i] - close[i + 1] + sumif sum <= renkoboxsize * -1 THENboxes1 = boxes1 + 1sum = 0ENDIFif sum >= renkoboxsize * 2 THENcount = 1ENDIFi = i + 1WENDcount = 0sum = 0while count = 0sum = close[i] - close[i + 1] + sumif sum >= renkoboxsize thenboxes2 = boxes2 + 1sum = 0ENDIFif sum <= renkoboxsize * -2 thencount = 1boxes2 = boxes2 + 1endifi = i + 1WENDsum = 0count = 0endifif verify = 2 THENWhile count = 0sum = close[i] - close[i + 1] + sumif sum >= renkoboxsize THENboxes1 = boxes1 + 1sum = 0ENDIFif sum <= renkoboxsize * -2 THENcount = 1ENDIFi = i + 1WENDcount = 0sum = 0while count = 0sum = close[i] - close[i + 1] + sumif sum <= renkoboxsize * -1 thenboxes2 = boxes2 + 1sum = 0ENDIFif sum >= renkoboxsize * 2 thencount = 1boxes2 = boxes2 + 1endifi = i + 1WENDsum = 0count = 0endifIF verify = 1 AND CountofLongShares = 0 AND CountofShortShares = 0 THENIF boxes1 <= boxes2 THENBUY 1 SHARES AT MARKETSET TARGET PROFIT 850SET STOP LOSS 1720ENDIFENDIFIF verify = 2 AND CountofLongShares = 0 AND CountofShortShares = 0 THENIF boxes1 <= boxes2 THENSELLSHORT 1 SHARES AT MARKETSET TARGET PROFIT 850SET STOP LOSS 1720endifendif08/17/2017 at 4:30 PM #4413308/17/2017 at 8:04 PM #4414308/17/2017 at 8:28 PM #44145Jess non conosco il tedesco ma credo che tu mi abbia chiesto se non credo che il risk/reward sia a mio svantaggio. Ovvio. Ma se guardi il grafico giornaliero da due anni fa fino ad oggi con un valore unità renko di 0.0085 ci sono più di una decina di segnali e tutti in profitto quindi niente falsi segnali. Keep it simple
Jess do not know German but I think you asked me if I do not think risk / reward is to my disadvantage. Obvious. But if you look at the daily chart from two years ago to today with a renko unit value of 0.0085 there are more than a dozen signals and all in profit thus no false signals. Keep it simple
08/19/2017 at 6:23 PM #44235Please guys, I’m not here to translate all your posts in the correct forum language! This is the English forum, please speak in English!! Thank you 😉
I’m sorry but your code is not so clear. Why are you making so much WHILE/WEND loops? It may have sense for you, but I still don’t get it myself sorry 🙂
About your post:
and the backtest must be done form 2 years ago. TY
I can help for sure to create code for you, but you’ll have to make test on your own of course.
So, in order to help you with speed and efficiency, could you please describe the whole strategy in English words? Screenshot like you made in your first post is greatly appreciated.
-
AuthorPosts
Find exclusive trading pro-tools on