Hi,
This is driving me mad , can someone please explain why this isn't working!?
To explain I have a very simple system:
MAs = MA(C,20);
MAl = MA(C,50);
Buy = Cross(MAs,MAl);
Sell = Cross(MAl,MAs);
What I want to do is to stop issuing buy signals based on something else, ie, another filter, maybe when the market is a bear market.
So, my system would now look like this:
flagval = 0;
MAs = MA(C,20);
MAl = MA(C,50);
Buy = Cross(MAs,MAl) AND flagval = 1;
Sell = Cross(MAl,MAs);
Where the first variable 'flagval' changes from 0 to 1.
However, if I run the above code I still get the same number of buy signals.
Surely the above code should not give me any buy signals as flagval is always zero and my buy criteria is looking for flagval = 1.
What am I missing here?
Thanks
This is driving me mad , can someone please explain why this isn't working!?
To explain I have a very simple system:
MAs = MA(C,20);
MAl = MA(C,50);
Buy = Cross(MAs,MAl);
Sell = Cross(MAl,MAs);
What I want to do is to stop issuing buy signals based on something else, ie, another filter, maybe when the market is a bear market.
So, my system would now look like this:
flagval = 0;
MAs = MA(C,20);
MAl = MA(C,50);
Buy = Cross(MAs,MAl) AND flagval = 1;
Sell = Cross(MAl,MAs);
Where the first variable 'flagval' changes from 0 to 1.
However, if I run the above code I still get the same number of buy signals.
Surely the above code should not give me any buy signals as flagval is always zero and my buy criteria is looking for flagval = 1.
What am I missing here?
Thanks