Close position at exactly opening candle price
Author: kalves
Creation Date: 3/5/2021 7:31 PM
profile picture

kalves

#1
Hi, I´m stuck trying to built my strategy:

Entry - RSI(2) < 50
Exit - OpenCandlePrice > EMA(3) or CloseCandlePrice >= EMA(3)

*Entries MUST be exactly at close price of the candle
*Exits MUST be:
When OpenCandlePrice > EMA(3) -> Exit MUST be exactly at open candle price
or
When CloseCandlePrice >= EMA(3) -> Exit MUST be exactly at close candle price


Someone could help me create the rule to close the position at exactly opening candle price?
profile picture

Eugene

#2
Hi,

There's everything you need to build it in Rules, including AtMarket/AtClose entry/exit and OR divider for the exit. What's stopping you?
profile picture

Cone

#3
QUOTE:
When OpenCandlePrice > EMA(3) -> Exit MUST be exactly at open candle price
or
When CloseCandlePrice >= EMA(3) -> Exit MUST be exactly at close candle price
These seem to be unrealistic rules because they require that you know the open (or close) price in advance to exit at precisely those prices. The exit at opening price rule is 'more' realistic because at least you could put an order in the market and maybe 1 out of 20 times you'll actually get that price. The trade at the close price is not realistic at all.

I'd be glad to know why you want to design and backtest a strategy like that. Can you provide some insight? Unless Eugene knows something I don't (and there's a good chance of that) I don't think this type of unrealistic strategy can be achieved with Strategy Builder.

Also, do you really want "RSI(2) < 50" or RSI Crosses below 50? There's a difference, especially upon triggering the next trade after an exit.
profile picture

Eugene

#4
Robert, I assumed that topic starter is talking about "Open of today > EMA as of yesterday close" as anything else would be peeking into the future as you correctly pointed out.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).