controlling the prev last bars
-
hi;
can you pls help me;
how can i controll the last 8 bars starting from -1,That for ex: ema 8>ema 21. .I want the system controlls the last 8 bars closed value.And in the last 8 bars minimum there will be 4 of them are ema8>ema21 ..
thx -
Candle -1 means a candle that doesn't exist yet. That means the bot cannot have any value for any EMA on that candle. The minimum should be candle ID 0. Then you can create a loop counting how many candles within the last 8 are meeting that condition.
-
okey i wrote wrong -1 must be 1 ..Then how will be the loop for "counting how many candles within the last 8 are meeting that condition."
-
@l-andorrà okey i wrote wrong -1 must be 1 ..Then how will be the loop for "counting how many candles within the last 8 are meeting that condition." at the begining "no trade" ..If i have any trade loop works but if no trade how can i make a loop for controlling the condition?
-
Can any 4 or more met the condition or are some specific 4 or more candles supposed to do it?