Trade with PRC GENESIS MATRIX
Forums › ProRealTime English forum › ProOrder support › Trade with PRC GENESIS MATRIX
- This topic has 3 replies, 2 voices, and was last updated 3 years ago by
Khaled.
-
-
02/26/2022 at 5:32 PM #188918
Can someone help me with buy and sell signal if matrix is fully blue or red. I only get error codes in backtest mode
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283//PRC_Genesis Matrix | indicator//10.09.2018//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//converted from MT4 indi// --- settings//TVI_Settings//TVIr=12//TVIs=12//TVIu=5//CCI_Settings//CCIPeriod=20//T3_Settings//T3Period=8//GannHiLo_Settings//GannHiLoPeriod=10// --- end of settings// Set histogram positionsIDXTVI=0.25IDXCCI=0.0IDXT3=-0.25IDXGHL=-0.5//TVI (Ticks Volume Indicator)Mypoint=pointsizeUpTicks=(Volume+(Close-Open)/MyPoint)/2DownTicks=Volume-UpTicksEMAUpTicks=average[TVIr,1](UpTicks)EMADownTicks=average[TVIr,1](DownTicks)DEMAUpTicks=average[TVIs,1](EMAUpTicks)DEMADownTicks=average[TVIs,1](EMADownTicks)TVIcalculate=100.0*(DEMAUpTicks-DEMADownTicks)/(DEMAUpTicks+DEMADownTicks)TVI=average[TVIu,1](TVIcalculate)//ProcessTVIif TVI>=TVI[1] thendrawtext("■",barindex,IDXTVI,dialog,bold,20) coloured(0,90,255)elsedrawtext("■",barindex,IDXTVI,dialog,bold,20) coloured(255,0,0)endif//CCI (Commodity Channel Index)dSig=CCI[CCIPeriod](typicalPrice)//ProcessCCIif dSig>0 thendrawtext("■",barindex,IDXCCI,dialog,bold,20) coloured(0,90,255)elsedrawtext("■",barindex,IDXCCI,dialog,bold,20) coloured(255,0,0)endif//T3e1 = ExponentialAverage[T3Period](close)e2 = ExponentialAverage[T3Period](e1)e3 = ExponentialAverage[T3Period](e2)e4 = ExponentialAverage[T3Period](e3)e5 = ExponentialAverage[T3Period](e4)e6 = ExponentialAverage[T3Period](e5)b = 0.618b2 = (b * b)b3 = (b * b * b)c1 = -b3c2 = (3 * b2) + (3 * b3)c3 = (-6 * b2) - (3 * b) - (3 * b3)c4 = 1 + (3 * b) + b3 + (3 * b2)avg = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3//ProcessT3if avg>=avg[1] thendrawtext("■",barindex,IDXT3,dialog,bold,20) coloured(0,90,255)elsedrawtext("■",barindex,IDXT3,dialog,bold,20) coloured(255,0,0)endif//GannHiLoif Close>average[gannhiloperiod](high)[1] thengann=1elsif Close<average[gannhiloperiod](low)[1] then gann=-1 endif //ProcessGann if gann>0 thendrawtext("■",barindex,IDXGHL,dialog,bold,20) coloured(0,90,255)elsedrawtext("■",barindex,IDXGHL,dialog,bold,20) coloured(255,0,0)endifreturn02/27/2022 at 9:16 AM #188934Hope this helps
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133DEFPARAM CUMULATEORDERS = FALSETIMEFRAME(1 hour)CondLong = 0CondShort = 0//PRC_Genesis Matrix | indicator// --- settings//TVI_SettingsTVIr=12TVIs=12TVIu=5//CCI_SettingsCCIPeriod=20//T3_SettingsT3Period=8//GannHiLo_Settings//GannHiLoPeriod=10// --- end of settings// Set histogram positionsIDXTVI=0.25IDXCCI=0.0IDXT3=-0.25IDXGHL=-0.5//TVI (Ticks Volume Indicator)Mypoint=pointsizeUpTicks=(Volume+(Close-Open)/MyPoint)/2DownTicks=Volume-UpTicksEMAUpTicks=average[TVIr,1](UpTicks)EMADownTicks=average[TVIr,1](DownTicks)DEMAUpTicks=average[TVIs,1](EMAUpTicks)DEMADownTicks=average[TVIs,1](EMADownTicks)TVIcalculate=100.0*(DEMAUpTicks-DEMADownTicks)/(DEMAUpTicks+DEMADownTicks)TVI=average[TVIu,1](TVIcalculate)//ProcessTVI//if TVI>=TVI[1] then//drawtext("■",barindex,IDXTVI,dialog,bold,20) coloured(0,90,255)//else//drawtext("■",barindex,IDXTVI,dialog,bold,20) coloured(255,0,0)//endif//CCI (Commodity Channel Index)dSig=CCI[CCIPeriod](typicalPrice)//ProcessCCI//if dSig>0 then//drawtext("■",barindex,IDXCCI,dialog,bold,20) coloured(0,90,255)//else//drawtext("■",barindex,IDXCCI,dialog,bold,20) coloured(255,0,0)//endif//T3e1 = ExponentialAverage[T3Period](close)e2 = ExponentialAverage[T3Period](e1)e3 = ExponentialAverage[T3Period](e2)e4 = ExponentialAverage[T3Period](e3)e5 = ExponentialAverage[T3Period](e4)e6 = ExponentialAverage[T3Period](e5)b = 0.618b2 = (b * b)b3 = (b * b * b)c1 = -b3c2 = (3 * b2) + (3 * b3)c3 = (-6 * b2) - (3 * b) - (3 * b3)c4 = 1 + (3 * b) + b3 + (3 * b2)avg = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3//ProcessT3//if avg>=avg[1] then//drawtext("■",barindex,IDXT3,dialog,bold,20) coloured(0,90,255)//else//drawtext("■",barindex,IDXT3,dialog,bold,20) coloured(255,0,0)//endif//GannHiLoif Close>average[gannhiloperiod](high)[1] thengann=1elsif Close<average[gannhiloperiod](low)[1] thengann=-1endif//ProcessGann//if gann>0 then//drawtext("■",barindex,IDXGHL,dialog,bold,20) coloured(0,90,255)//else//drawtext("■",barindex,IDXGHL,dialog,bold,20) coloured(255,0,0)//endifCondLong = TVI>=TVI[1] and dSig>0 and avg>=avg[1] and gann>0CondShort = TVI<TVI[1] and dSig<0 and avg<avg[1] and gann<0TIMEFRAME(DEFAULT)IF NOT LongOnMarket AND CondLong THENBUY 1 CONTRACTS AT MARKETENDIFIF NOT ShortOnMarket AND CondShort THENSELLSHORT 1 CONTRACTS AT MARKETENDIFIf LongOnMarket AND CondShort THENSELL AT MARKETSELLSHORT 1 CONTRACTS AT MARKETENDIFIF ShortOnMarket AND CondLong THENEXITSHORT AT MARKETBUY 1 CONTRACTS AT MARKETENDIFSET STOP %LOSS SLSET TARGET %PROFIT TPI added TIMEFRAME(1 hour) and you can plug in on a 5 min chart for example. I tested it quick and dirty, so cannot comment on the results. You need to optimize the different variables.
2 users thanked author for this post.
02/27/2022 at 10:05 AM #188939Thanks for the help, but i have an error code (the following variable is undefined: GannHiloPeriod) Is that what you mean with (You need to optimize the different variables) ? Sorry but i dont no how to fix it.
I have to leave the computer now but please help me.
Best Regards Lasse02/27/2022 at 10:19 AM #188940Line 24 you need to remover the “//” just before //GannHiLoPeriod=10.
You need to watch the video about backtesting.
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on