Indicator problem

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #27760 quote
    Elsborgtrading
    Participant
    Veteran

    Hi traders.

    I am wondering why this condition is never true on Fridays, but is on Sundays?

    here the TF is 1 Day

    atr = averagetruerange[10](close)*0.5
    tradeingweek = dayofweek <=5
    x1=2
    c1=(highest[x1](close))
    
    if high>c1 and tradeingweek then
    DRAWTEXT("True", barindex, high[1]+atr*10, Dialog, Standard, 12) COLOURED(0,0,255)
    DRAWARROWDOWN(barindex,high[1]+atr*3) COLOURED(128,128,128)
    endif
    
    
    Return
    

    If it’s put in a proorder as a trade condition it will trade on Fridays

     

    Cheers Kasper

    Screenshot_7.jpg Screenshot_7.jpg
    #27763 quote
    Nicolas
    Keymaster
    Master

    You should give a try with this instruction instead: OpenDayOfWeek

    #27813 quote
    Elsborgtrading
    Participant
    Veteran

    Hi 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.

    tradeingweek = OpenDayOfWeek <=5 
    
    atr = averagetruerange[10](close)*0.5
    
    x1=2
    c1=(highest[x1](close))
    
    if high>c1 and tradeingweek then
    DRAWTEXT("True", barindex, high[1]+atr*10, Dialog, Standard, 12) COLOURED(0,0,255)
    DRAWARROWDOWN(barindex,high[1]+atr*3) COLOURED(128,128,128)
    endif
    
    
    Return 
    

    With the first code- Proorder will trade like before- but Indicator will not show on Friday or Sunday

    tradeingweek = dayofweek <=5
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Indicator problem


Platform Support: Charts, Data & Broker Setup

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Elsborgtrading
9 years ago.

Topic Details
Forum: Platform Support: Charts, Data & Broker Setup
Language: English
Started: 03/08/2017
Status: Active
Attachments: No files
Logo Logo
Loading...