strategy BarHunter DAX v1p
Forums › ProRealTime English forum › ProOrder support › strategy BarHunter DAX v1p
- This topic has 255 replies, 11 voices, and was last updated 1 year ago by sfl.
-
-
01/21/2020 at 10:41 PM #11745901/22/2020 at 2:56 PM #11751901/22/2020 at 3:16 PM #11752001/22/2020 at 4:42 PM #11753401/22/2020 at 5:13 PM #117539
so we can pick a entry-type which is reliable regardless of the bar-number and results.
Yeah but as backtest does not perform same as Live (which is a nonsense in itself!?) then how can we prove what is reliable other than Live Forward Test … which would take for ever as so few trades?
I guess if we don’t use stop entry then backtest results should be closer to Live results and so more reliable?
If I recall correctly, my 5 min version is an at market entry … hopefully there should be would be no Issues re minimum distance
01/22/2020 at 5:39 PM #11754312345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485// ================trailing atr stop VIRTUAL==================if enabletsvir then//once stepsvir=0once minatrdistvir=0once atrtrailingperiodvir = 2 // atr parameteronce minstopvir = 10 // minimum distanceif barindex=tradeindex thentrailingstoplongvir = 5 // trailing stop atr distancetrailingstopshortvir = 5 // trailing stop atr distanceelseif longonmarket thenif newslvir>0 thenif trailingstoplongvir>minatrdistvir thenif newslvir>newslvir[1] thentrailingstoplongvir=trailingstoplongvirelsetrailingstoplongvir=trailingstoplongvir-stepsvirendifelsetrailingstoplongvir=minatrdistvirendifendifendifif shortonmarket thenif newslvir>0 thenif trailingstopshortvir>minatrdistvir thenif newslvir<newslvir[1] thentrailingstopshortvir=trailingstopshortvirelsetrailingstopshortvir=trailingstopshortvir-stepsvirendifelsetrailingstopshortvir=minatrdistvirendifendifendifendif//atrtrailvir=averagetruerange[atrtrailingperiodvir]((close/10)*pipsize)/1000trailingstartlvir=round(atrtrailvir*trailingstoplongvir)trailingstartsvir=round(atrtrailvir*trailingstopshortvir)tglvir=trailingstartlvirtgsvir=trailingstartsvir//if not onmarket or ((longonmarket and shortonmarket[1]) or (longonmarket[1] and shortonmarket)) thenmaxpricevir=0minpricevir=closenewslvir=0endif//if longonmarket thenmaxpricevir=max(maxpricevir,close)if maxpricevir-tradeprice(1)>=tglvir*pointsize thenif maxpricevir-tradeprice(1)>=minstopvir thennewslvir=maxpricevir-tglvir*pointsizeelsenewslvir=maxpricevir-minstopvir*pointsizeendifendifendif//if shortonmarket thenminpricevir=min(minpricevir,close)if tradeprice(1)-minpricevir>=tgsvir*pointsize thenif tradeprice(1)-minpricevir>=minstopvir thennewslvir=minpricevir+tgsvir*pointsizeelsenewslvir=minpricevir+minstopvir*pointsizeendifendifendif//if longonmarket and close <newslvir and newslvir>0 thensell at marketendifif shortonmarket and close>newslvir and newslvir>0 thenexitshort at marketendifI have two trailing stops Whoever moves the stop And the other if it is closed is above or below the newslvir01/22/2020 at 5:55 PM #11754601/22/2020 at 8:46 PM #11756501/22/2020 at 9:07 PM #117569Thanks fifi! The virtual stop is implemented as I thought. The original ts still running with atrtrailingperiod=14 and the virtual with value 2. Also the test de nombre de bar negative ajouter makes a difference. Total results is a bit the same, but the equitycurve has a nicer shape!
I’am working on something to drop the stop for entry. But it’s not there yet.
01/23/2020 at 4:47 PM #117627@fifi, with importing I noticed tick by tick wasn’t enabled, so I did the test again and with target profit disabled.
your average loss dropped quite a bit. Will test to to see what difference it brings to the market version.
Unfortunately I don’t understand the benefit of the virtual trailing stop and see very little difference. Maybe it shows more with live trading.
01/23/2020 at 7:09 PM #11763701/25/2020 at 4:23 PM #11781001/26/2020 at 12:26 AM #117845Hi Fifi43
Thanks I will look into this. I found irregularities when using barindex numbers. Because when there is no data, everything shifts a bar! Doesn’t happen too much on 1 hour timeframe, but it could be more often on lower timeframes and I want it to be universal.
So I’m testing a way too quickly and efficiently optimise time using hour & any minutes. Also looking in your nicely coded FILTRE_Prise_Position if it could be of use for profittaking.
01/26/2020 at 7:10 AM #117852@Grahal
Did you figure out the exact reason of the difference ? As I am also getting a different equity curve and number of trades. I believe it is the timezone. I only 100 K bars to test, so I can’t compare exactly to the latest from fifi. But if I change the timezone to be inline with the others, I get exactly the same drawdown (869.80) and similar profit profile per month.
Optimizing barnumber might not give you the same result.
01/26/2020 at 7:18 AM #117853 -
AuthorPosts
Find exclusive trading pro-tools on