AFL Function Reference - HIGHESTSINCE HIGHESTSINCE
- highest value since condition met
SYNTAX highestsince( EXPRESSION, ARRAY, Nth = 1 ) RETURNS ARRAY FUNCTION Returns the highest ARRAY value since EXPRESSION was true on theNth most recent occurrence. EXAMPLE highestsince( Cross( macd(), 0 ), Close, 1 ) returns the highest close price since macd() has crossed above zero.
Also there is valuewhen
AFL Function Reference - VALUEWHEN VALUEWHEN
- get value of the array when condition met
SYNTAX valuewhen(EXPRESSION, ARRAY, n = 1) RETURNS ARRAY FUNCTION Returns the value of the ARRAY when the EXPRESSION was true on the n -th most recent occurrence. Note: this function allows also 0 and negative values for n - this enables referencing future EXAMPLE valuewhen( cross( close, ma(close,5) ) ,macd(), 1)
so basically the above ready made function I search. In the end i will probably manage to solve them and if i define them within "UserdefinedMethods" I should be able to use them in any indicator. what I do not understand is why they are not already defined, should be extremely easy for a programmer but for me its pretty difficult to learn c++ and I dont need C++ to trade. That is why I said that Ninja programmers should make this easier for traders by defining such functions because I personally am really not interested in learning computer languages.
PS:
Ralph if you can solve them fast and put them here I wont mind
Comment