Termos de Referência
I would like to create a tradingview robot that will sync with tradovate. My strategy is as follows:
Chart Setup - MES on left and MNQ on right. The MES chart has quarter levels on it. The MNQ has the volume indicator.
Trading Session is from 9:30AM EST - 11:00AM EST
If most recent price action has crossed *up* a quarter level on MES, I look for *sells* on MNQ. My trigger for a sell is a bearish engulfing candlestick pattern combined with bearish engulfing volume. I would like to have a limit order set at the bottom of the first candle in the engulfing pattern. The stoploss would be at the top of the first candle. I would like takeprofit options of 1x, 2x or 3x.
If most recent price action has crossed *down* a quarter level on MES, I look for *buys* on MNQ. My trigger for a buy is a bullish engulfing candlestick pattern combined with bullish engulfing volume. I would like to have a limit order set at the top of the first candle in the engulfing pattern. The stoploss would be at the bottom of the first candle. I would like takeprofit options of 1x, 2x or 3x.
See example of tradingview screenshot:
Parameters I would like to control:
Assets 1 (MES) and 2 (MNQ)
Psychological Levels/Increments
Allowed Direction
Session Time
Max Daily Loss
Daily Profit Target
Risk per Trade
Take Profit Risk:
Reward Break Even Trigger: 1R or None
Please let me know if this is feasible.
Unfortunately, I do not have an existing pinescript. But I can answer your other questions and provide examples. Bearish engulfing volume means the red volume bar is higher than the previous green volume bar. Bullish engulfing volume means the green volume bar is higher than the previous red volume bar.
As for the quarter level crossing, I am looking for a candle body close above the quarter level for it to be considered a cross up. I am looking for a candle body close below the quarter level for it to be considered a cross down. When you look at the screenshots I've attached, I have detailed each confirmation needed in order to enter a trade (numbered 1 - 3). I have also identified where the limit order will be placed (4) and where the stoploss (5) will be placed. Attached, you will find examples of both a buy and a sell. The expiration of the limit order will 1 hour from the initial set up.
Based on my understanding, this is the summary of the strategy:
- MES is used to determine the quarter-level direction.- A body close above a quarter level = cross up → look for shorts on MNQ.
- A body close below a quarter level = cross down → look for longs on MNQ.
- Bearish engulfing volume: the red volume bar is higher than the previous green volume bar.
- Bullish engulfing volume: the green volume bar is higher than the previous red volume bar.
- The candlestick pattern and volume confirmation must both occur before the setup is valid.
- The limit order is placed according to the level shown in your examples.
- The stop loss is placed according to your marked level.
- Take-profit options will be 1R, 2R, or 3R.
- The pending limit order will expire 1 hour after the initial setup.
- Trading session: 9:30 AM–11:00 AM EST.
- Configurable parameters will include risk per trade, maximum daily loss, daily profit target, allowed direction, session time, and break-even settings.