[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can metastock do flip flops?



PureBytes Links

Trading Reference Links

I would appreciate some help!   In an indicator or system test,  if we
assume 
a buy signal is on condition A  ( any conditional statement)
and a sell  signal is on condition B, ( a different conditional statement)

How do I write it so that once the buy signal is given, next the tester is
only looking for the sell signal?

If I use a nested if statement, such as;  If (condA, 1, if(condB, -1, 0),
then each day, it is checking for condition A to be true, which I do not
necessarily want it to do.

What I am after is for the tester to flip flop from one state, search for
cond B when long, to the other state, search for condition A when short.
How to do this in MS?

Thanks in advance.