ReyLoco
Pine Script Rookie
Pine Script Rookie
Posts: 1
Joined: January 10th, 2024
Contact: TradingView Profile

help with the new advanced template

using the new advanced template, i don't understand the following:

bool LongTrade = ta.rsi(close, 14) < 30 and close > open and strategy.position_size == 0
bool ShortTrade = ta.rsi(close, 14) > 70 and close < open and strategy.position_size == 0
bool UseExitReason = STRATEGY_EXIT_HCLC or STRATEGY_EXIT_EXHAUST

someone please help me understand WHY when i use {close>open} OR {close<open} as part of my Entry confluence for my IT STILL ENTERS A TRADE ON THE WRONG CANDLE {{Bullish candle on a Sell AND a Bearish candle on a Buy))??
also WHY??? when i use the option STRATEGY_EXIT_EXHAUST it enters the trade and immediately exits the trade for basically a Loss because it is entering on a Bullish candle on a Sell AND a Bearish candle on a Buy?

Can someone please help me, thanks in advance.

Return to “Pine Script Q&A”