Announcement

Collapse
No announcement yet.

Rally

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Rally

    Hi guys!

    I'm trying to build an EFS that makes a sound and appears a text message beside the price, when:

    - Price goes over (high of last 10minutes) + .50c

    OR

    - Price goes below (low of last 10minutes) - .50c

    Thanks a lot!

    Roberto

    [email protected]

  • #2
    Re: Rally

    Roberto

    - Price goes over (high of last 10minutes) + .50c
    The logic required to evaluate that condition (and your other condition for the Low) could be quite different depending on what you mean
    Assuming for example that you are plotting a 1 minute chart that condition could mean that the High of any 1 minute bar within the current 10 minute time frame is higher than the High of the last 10 minute time frame plus 0.50 or it could mean that the High of the current 1 minute bar is higher than the highest High of the last ten 1 minute bars plus 0.50 [ie a "rolling" 10 minute time frame]. The two conditions are not necessarily the same as you can see in the screenshot enclosed below



    In the first case the conditional statement would be
    PHP Code:
    if(high(0) > high(-1,inv(10))+0.50
    whereas in the second case the conditional statement would be
    PHP Code:
    if(high(0) > upperDonchian(10,-1)+0.50
    Once you have defined which condition you are looking for then you would just need to add whatever commands you wish to execute eg
    PHP Code:
    if(high(0) > upperDonchian(10,-1)+0.50){
        
    Alert/playSound("ding.wav");
        
    drawTextRelative(...your parameters...)
        ...
    //rest of your code 
    Note that these are just basic examples to illustrate the logic
    Alex


    Originally posted by robertodsbastos
    Hi guys!

    I'm trying to build an EFS that makes a sound and appears a text message beside the price, when:

    - Price goes over (high of last 10minutes) + .50c

    OR

    - Price goes below (low of last 10minutes) - .50c

    Thanks a lot!

    Roberto

    [email protected]

    Comment

    Working...
    X