Quantcast
Channel: Traderji.com
Viewing all articles
Browse latest Browse all 10287

TimeFrameGetPrice

$
0
0
Code:

        aavg = 5;
        if (Interval(0) == inDaily)
        {
                avO = MA(Open, aavg);
                avH = MA(High, aavg);
                avL = MA(Low, aavg);
                avC = MA(Close, aavg);
        } else
        {
                avO = MA(TimeFrameGetPrice("O", inDaily, 0 , expandLast), aavg);
                avH = MA(TimeFrameGetPrice("H", inDaily, 0 , expandLast), aavg);
                avL = MA(TimeFrameGetPrice("L", inDaily, 0 , expandLast), aavg);
                avC = MA(TimeFrameGetPrice("C", inDaily, 0 , expandLast), aavg);                       
        }

Above AFL snippet produces different results based on Time frame in which data is being viewed, whereas the whole idea behind writing this was to eliminate precisely this. Can anyone figure out what I am not doing correctly?

Viewing all articles
Browse latest Browse all 10287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>