Affichage des articles dont le libellé est Learning AmiBroker. Afficher tous les articles
Affichage des articles dont le libellé est Learning AmiBroker. Afficher tous les articles

samedi 21 janvier 2017

Learning AmiBroker

Hi,

I am Learning AFL and need some help.

Can someone guide me for the following:
I am calculating Opening 15 minute High and Low. And want to trade rest of the day using those values. But in Day 2 and so on, for first 15 minutes, these variables value should be 0. Currently, it is retaining previous day's values. How can I reset it?

Here's part of my AFL:
TimeFrameSet( in1Minute );

tn = TimeNum();

ObservationStartTime = 91559;
ObservationEndtime = 92959;

StartBar = tn == ObservationStartTime;
EndBar = tn == ObservationEndtime;


Opening15MinHigh = ValueWhen( EndBar, HighestSince( StartBar, High ) );
Opening15MinLow = ValueWhen( EndBar, LowestSince( StartBar, Low ) );


Please guide how can I achieve this?

Thanks


Learning AmiBroker