Discussion re Pure Renko strategy
Forums › ProRealTime English forum › ProOrder support › Discussion re Pure Renko strategy
- This topic has 345 replies, 24 voices, and was last updated 4 years ago by bertrandpinoy.
Tagged: renko
-
-
03/12/2020 at 7:42 PM #12199103/12/2020 at 8:36 PM #122005
maybe what can be tested is trading the equity curve
if performance falls, stop live trading, but keep counting fake trade results.
If the fake results pick up, start trading live again.
@Francesco second timeframe appears to be excellent to iron out the shortcomings and fix those. Later on I go back to a slower timeframe.
Today anyway was a great day, but I’am not so sure if the results hold, when trading a much smaller range.
1 user thanked author for this post.
03/12/2020 at 8:58 PM #122006f performance falls, stop live trading, but keep counting fake trade results. If the fake results pick up, start trading live again.
Good idea as I have a few times today thought … I’ll put this live on Lot size 0.2 as it is doing so well then it goes through a losing phase! 🙂 But still in profit overall!
If it wasn’t for the “broker does not know the status of your last order” System Stop then I would have 5 or 6 versions running at the same time and pick the best!
03/14/2020 at 11:52 PM #122154Found a code from Nicolas and adopted it slightly to fit this strategy. It slows it down on 200k bars though.
i.e. Can be used to trade only in the trend
123456789101112131415161718192021222324252627//moving averageonce usema=1if usema thenonce priceMAperiod=14count=0sum=0lastbox=0for i = 0 to barindex doif renkomax[i]<>lastbox thenlastbox=renkomax[i]count=count+1median=((renkomax[i]+renkomin[i])/2)sum=sum+medianif count=priceMAperiod+1 thensum=sum-lastlast=medianbreak//endifendifnextonce avg=undefinedif last<>last[1] thenavg = sum/priceMAperiodendifgraphonprice avg as "average renko"endifthere was always something off with the “dynamic box”. Removed the +/- 1.
12345678910boxsize=25 // 5 to 35boxdiff=0 // -5 to 5if dynamicbox thenif close>close[1] and close[1]>close[2] thenboxsize=boxsize+boxdiffelsif close<close[1] and close[1]<close[2] thenboxsize=boxsize-boxdiffendifendif03/15/2020 at 2:00 PM #122169it’s based on code what’s already used to determine performance.
Takes the last completed trade result from a long (green) or short (red) and plot’s it as 1 for a win and -1 for a loss.
Not sure yet if it could be usefull.
1234567891011121314151617if (longperf>longperf[2]) thenpreviouslong=1elsif (longperf<longperf[2]) thenpreviouslong=-1elsepreviouslong=0endifif (shortperf>shortperf[2]) thenpreviousshort=1elsif (shortperf<shortperf[2]) thenpreviousshort=-1elsepreviousshort=0endifgraph previouslong coloured(0,200,0) as "long result (1=win;-1=loss)"graph previousshort coloured(200,0,0) as "short result (1=win;-1=loss)"03/15/2020 at 3:23 PM #122181Not sure yet if it could be usefull.
If anybody can … you can Paul!
I’m sold on these 1 second Systems …. loved it last week, so interesting due to loads trades!
And with the DJi up and down by 1oo points and more in 1 min the 1 Sec TF could be the way to go!?
Btw I found Hour > 3 and Hour < 23 giving consistent good results re times to trade.
2 users thanked author for this post.
03/16/2020 at 4:06 PM #122258If it wasn’t for the “broker does not know the status of your last order” System Stop then I would have 5 or 6 versions running at the same time and pick the best!
When trying different positionsizes. like 1 contract, 1,01 etc I’am testing currently. Doesn’t seem to work though?
Interesting is the south african 40 to test too, in the timezone with the lowest spread.
Still backtest difference from the forward demo test, even with the fixes I tried.
1 user thanked author for this post.
03/16/2020 at 4:36 PM #12226703/16/2020 at 5:39 PM #12227403/16/2020 at 6:35 PM #122279Good evening Fifi,
The code comes from the prorealtime manual on page 11.
You can set the validity length of limit and stop orders.
The following example shows how it is possible to create a limit order with a validity set to a specific number of bars by using variables. The code places a buy limit order at the close price of the bar on which a moving- average crossover occurred. This limit is valid for 10 bars after the bar of the crossing. If it is not executed during these 10 bars, it is cancelled.
1234567891011121314// Definition of the validity length of the orderONCE NbBarLimit = 10MM20 = Average[20](close) MM50 = Average[50](close)// If MM20 crosses over MM50, we define 2 variables "MyLimitBuy" and "MyIndex" containing the close price at that time and the index of the bar of the cross.IF MM20 CROSSES OVER MM50 THEN MyLimitBuy = closeMyIndex = BarindexENDIFIF BarIndex >= MyIndex + NbBarLimit THEN MyLimitBuy = 0ENDIF// Place an order at the price MyLimitBuy valid as long as this variable is greater than 0 and we are not in a long position.// Remember: MyLimitBuy is greater than 0 for the 10 bars after the bar of the crossing.IF MyLimitBuy > 0 AND NOT LongOnMarket THENBUY 1 SHARES AT MyLimitBuy LIMITENDIFIn case the order was not executed, it is possible to replace the expired buy limit order with a buy at market price order. This could be done by adding the following code to the previous one:
123IF MyIndex + NbBarLimit AND MyLimitBuy > 0 AND NOT LongOnMarket THENBUY 1 SHARES AT MARKETENDIF1 user thanked author for this post.
03/16/2020 at 6:45 PM #12228103/16/2020 at 6:47 PM #122284Link to Paul’s post above added as Log 200 here …
1 user thanked author for this post.
03/16/2020 at 8:10 PM #122290Right above the trailling stop, I put this code.
12345678910if longonmarket and barindex<=myindex + nbbarlimit and strategyprofit>strategyprofit+(close-positionprice)*round(COUNTOFLONGSHARES/positionsize) thentrailingstoptype=0elsetrailingstoptype=1endifif shortonmarket and barindex>=myindex + nbbarlimit and strategyprofit>strategyprofit+(positionprice-close)*round(COUNTOFSHORTSHARES/positionsize) thentrailingstoptype=0elsetrailingstoptype=1endif03/16/2020 at 8:36 PM #122293Thanks I will included it! Working on last part.
I’ve 2 different versions, one with the code in the manual above, other normal approach.
If using nnbarlimit=1 then both systems have the same result, as it should be.
Also 3 ways to calculate the boxes. pfff and an attempted fix to run correctly.
03/16/2020 at 9:51 PM #122295Renkoboxes default uses close, I experimented with totalprice & Heiken Ashi.
Removed dynamic box. It added nothing good enough.
results are with spread 2.4 between 8am and 22pm.
Original renko based on “close” with boxsize_25, 6k
renko based on “Heiken Ashi” with boxsize__ 20, 10k
more important I still see differences between live & active orders from the backtest. Maybe because I’am running different versions. Tomorrow I will stick to one.
4 users thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on