Convert to afl this basic

#1
How to write in afl this sell conditions?


If LongOnMarket AND WeightedAverage[30](close)[2]<WeightedAverage[30](close)[1]and WeightedAverage[30](close)[1]> WeightedAverage[30](close)and close< WeightedAverage[30](close) and close[1]< WeightedAverage[30](close) THEN
SELL AT MARKET
ENDIF
 
#3
Please share the full logic. what is long on market conditions?
Cachu thanks for your interest.

I think there is no need to write the previous long conditions.

I know that "if long on market" in prorealtime program that uses basic language is the same that "sell if" in afl language.

Please what I want to know is how to sell if the close price of this week and the previous one are below the weighted average 30 periods close and the weighted average 30 close is descending.

Thanks again
 

Similar threads