Indicator problem
Forums › ProRealTime English forum › ProRealTime platform support › Indicator problem
- This topic has 2 replies, 2 voices, and was last updated 7 years ago by Elsborgtrading.
-
-
03/08/2017 at 3:32 PM #27760
Hi traders.
I am wondering why this condition is never true on Fridays, but is on Sundays?
here the TF is 1 Day
123456789101112atr = averagetruerange[10](close)*0.5tradeingweek = dayofweek <=5x1=2c1=(highest[x1](close))if high>c1 and tradeingweek thenDRAWTEXT("True", barindex, high[1]+atr*10, Dialog, Standard, 12) COLOURED(0,0,255)DRAWARROWDOWN(barindex,high[1]+atr*3) COLOURED(128,128,128)endifReturnIf it’s put in a proorder as a trade condition it will trade on Fridays
Cheers Kasper
03/08/2017 at 3:45 PM #27763You should give a try with this instruction instead: OpenDayOfWeek
03/08/2017 at 7:36 PM #27813Hi Nikolas and thanks.
Okay so that solved the Friday. Problem is that the Proorder is correct and will trade Friday if these condition are used. With the change -Pro order will still trade at candle start Sunday @23:00 (DAX)- and then every day 01:00 Monday-friday. but the indicator will not show on Sunday. It seems like condition in pro order and Indicator is not resolved equally. Could there a bug in the Indicator section?
These are my findings:
this will trade Sun@23:00, Mon-Fri@01:00 if conditions are used in Proorder, but indicator will not show on Sun.
1tradeingweek = OpenDayOfWeek <=512345678910111213atr <span class="token operator">=</span> <span class="token indicators">averagetruerange</span><span class="token punctuation">[</span><span class="token number">10</span><span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token keyword">close</span><span class="token punctuation">)</span><span class="token operator">*</span><span class="token number">0.5</span>x1<span class="token operator">=</span><span class="token number">2</span>c1<span class="token operator">=</span><span class="token punctuation">(</span><span class="token indicators">highest</span><span class="token punctuation">[</span>x1<span class="token punctuation">]</span><span class="token punctuation">(</span><span class="token keyword">close</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token keyword">if</span> <span class="token keyword">high</span><span class="token operator">></span>c1 <span class="token keyword">and</span> tradeingweek <span class="token keyword">then</span><span class="token function">DRAWTEXT</span><span class="token punctuation">(</span><span class="token string">"True"</span><span class="token punctuation">,</span> <span class="token keyword">barindex</span><span class="token punctuation">,</span> <span class="token keyword">high</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token operator">+</span>atr<span class="token operator">*</span><span class="token number">10</span><span class="token punctuation">,</span> Dialog<span class="token punctuation">,</span> Standard<span class="token punctuation">,</span> <span class="token number">12</span><span class="token punctuation">)</span> <span class="token keyword">COLOURED</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">0</span><span class="token punctuation">,</span><span class="token number">255</span><span class="token punctuation">)</span><span class="token function">DRAWARROWDOWN</span><span class="token punctuation">(</span><span class="token keyword">barindex</span><span class="token punctuation">,</span><span class="token keyword">high</span><span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token operator">+</span>atr<span class="token operator">*</span><span class="token number">3</span><span class="token punctuation">)</span> <span class="token keyword">COLOURED</span><span class="token punctuation">(</span><span class="token number">128</span><span class="token punctuation">,</span><span class="token number">128</span><span class="token punctuation">,</span><span class="token number">128</span><span class="token punctuation">)</span><span class="token keyword">endif</span>Return</code><code class="language-prorealtime">With the first code- Proorder will trade like before- but Indicator will not show on Friday or Sunday
1tradeingweek = dayofweek <=5 -
AuthorPosts
Find exclusive trading pro-tools on