Login Page - Create Account

Support Board


Date/Time: Tue, 14 May 2024 12:51:24 +0000



Post From: Trading System Based on Moving Average Crossover

[2024-03-24 02:15:21]
User643426 - Posts: 93
I'm working on creating an Automated Trading System based on the Moving Average Crossover Study. I'm using the Cross of the 9EMA above the 21 EMA as a Buy Entry. However, I only want the Buy Entry to occur when price is above VWAP. I would like the Buy Exit to occur on the close below the 9EMA.

Conversely, the Sell Entry would be when the 9EMA crosses below the 21EMA but only when price is below VWAP and the Sell Exit would be when price closes above the 9EMA. Does anyone know how to do this?

If I only wanted the Buy and Sell Entries to occur upon the cross of the 9EMA Above/Below the 21 EMA with the Moving Average Cross Over Study as ID1, is the formula below correct? If so, I'm not sure how to add the qualifier to only make the trade when Above/Below VWAP.

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

Buy Exit:
=C<ID1.SG1

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

Sell Exit:
=C>ID1.SG1