Login Page - Create Account

Support Board


Date/Time: Sun, 24 Nov 2024 21:55:04 +0000



Post From: Trading System Based on Moving Average Crossover

[2024-10-27 05:56:35]
User643426 - Posts: 127
Hi Tom,

I just had a quick question about the Moving Average Crossover Trading System you helped me with a while ago. The system below is for a Buy Entry when the 9EMA crosses above the 21 EMA and when Price is above VWAP. This system only delivers a Buy Entry Signal when the 9EMA crosses above the 21EMA and price is already above VWAP. If the 9EMA crosses above the 21 EMA with price below VWAP but later price moves above VWAP, this system will not deliver a Buy Entry Signal. Do you know how I would write the code for the system to work when the 9EMA crosses above the 21EMA at one time with price below VWAP and then generates a BUY Entry signal at a later time when Price moves above VWAP (after the 9/21 EMA crossover occurred)? Thank you.


Buy Entry:
=AND(CROSSFROMBELOW(ID1.SG1,ID1.SG2),C>ID2.SG1))

Buy Exit:
=CROSSFROMABOVE(C,ID1.SG1)

Sell Entry:
=AND(CROSSFROMABOVE(ID1.SG1,ID1.SG2),C<ID2.SG1))

Sell Exit:
=CROSSFROMBELOW(C,ID1.SG1)

-where:
ID1.SG1 is the 9EMA
ID1.SG2 is the 21EMA
ID2.SG1 is the VWAP