ATR, DomPhase and TimeFrame crash

Posted By: 512mb

ATR, DomPhase and TimeFrame crash - 05/25/14 12:30

Got inconsistant series here:

function run()
{
BarPeriod = 15;
// TimeFrame=2;// uncomment to crash

vars Price = series(price());
vars DomPhase=series(sin(DominantPhase(Price,80)+PI/4));

if(rDominantPeriod>40)
if((ATR(5)/PIP)>1)
{}

// Workaround:
// var x=ATR(5)/PIP;
// if(rDominantPeriod>40)
// if(x>1)
// {}
}

Also there is 'i' omitted in word "Automation" in Zorro window and in the manual. cool
Posted By: dusktrader

Re: ATR, DomPhase and TimeFrame crash - 05/26/14 02:19

Hey 512mb, check the manual on ATR function. It does say that when TimeFrame>1, that ATR() will internally create a series (therefore, the ATR-created series becomes inconsistent since it wouldnt be called on every iteration).

You can't create a series inside of conditional statement. Instead, I think your workaround is the correct solution in this case.
Posted By: jcl

Re: ATR, DomPhase and TimeFrame crash - 05/26/14 08:14

As to the missing "i", there is no word "Automation" in the Zorro manual - that might be the reason that you can't find the "i" wink.
Posted By: 512mb

Re: ATR, DomPhase and TimeFrame crash - 05/26/14 11:45

Thanks,

Yes there is word "Automaton" in online manual-in Site Map.
Posted By: jcl

Re: ATR, DomPhase and TimeFrame crash - 05/26/14 11:57

http://en.wikipedia.org/wiki/Automaton
Posted By: GPEngine

Re: ATR, DomPhase and TimeFrame crash - 05/26/14 23:57

Obligoatory http://en.wikipedia.org/wiki/The_Turk
© 2024 lite-C Forums