PureBytes Links
Trading Reference Links
|
Hi Joe,
Actually you ask a great question. I was fortunate to have smart people around to explain the difference to me which is quite dramatic.
Cross(MA1, MA2) is only true on the day of the cross. This is called an impulse signal because if you visualize it over time it would look like 0000000 1 000000 where "1"is the day that it is true. Exrem function also creates the impulse signal which is used to give us the buy/sell/short/cover for our systems.
MA1 > MA2 is true as long as MA1 is greater than MA2. This is "state" form. A way of describing this would be "OnBuy" or "ÖnSell". When you use the Flip() function you are creating a state form as well. In other words you are either on a buy state (1) or sell state (0). It would look like this
000 111111111 000000 where the "1" is when the MA1 > MA2.
So, why is this important? If you are going to "AND" two conditions together you need to ensure that the two conditions are in state form because typically you're wanting a situation where MA1 > MA2 and MA2 > MA3. If the conditions are in impulse form (via Cross() ), you are essentially saying that the two conditions must be true on the same bar for the "AND" condition to be true. BTW, "NOT" needs state form as well for the same reasons.
You can OR two impulse conditions together. For example Cross(MA1,MA2) OR Cross(MA2,MA3) you are saying as long as one of the two are true then the OR statement is true.
I could go on, but I think this should be enough to get your going.
Regards,
Garyemg_gang <joeemmett@xxxxxxxxxxx> wrote:
Is it proper to use the "Cross" statement in a BUY statement or the > symbol. I have been using these interchangeable, but it appears I should not!Buy = Cross(MA(C,30),MA(C,50));Buy = MA(C,30) > MA(C,50);I was doing some optimization for MA and found a difference in returns between using the "Cross" or the '>'!I would have thought they would be the same since they both buy when the 30 day is greater than the 50 day!Could someone tell me which one is correct and if you have time WHY!Thanks, JoeSend BUG REPORTS to bugs@xxxxxxxxxxxxxSend SUGGESTIONS to suggest@xxxxxxxxxxxxx-----------------------------------------Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx (Web page: http://groups.yahoo.com/group/amiquote/messages/)--------------------------------------------Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
Yahoo! Groups Sponsor
ADVERTISEMENT
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|