Variable containing history data of any bar

#1
Hello to everyone!

That's my first post here and I'm glad that I have opportunity to write here. Please help me to solve my problem with AFL language.

I'd like to have access to variable witch contains number/data of any bar from the past.

For example:
I want to create formula that gives singal to buy when MACD crosses the signal line AND if market price will be greater than close price from the session WHEN MACD gives signal.

I can't get to data from day/moment when only MACD gives signal.
How can I create variable with close price from this moment (then I'll compare only variable with current market price) or number of bar when it is happen (then I'll compare close[viariable with bar number] with current market price).

Sorry for my English - hope you understand me clearly;)
Please help me if you can:)

Greetings,
Jarek
 

Similar threads