Skip to content

Question on step reward #104

@condorman

Description

@condorman

Hi, I have a doubt about the reward function.
If in a specific state I get the action to close a LONG position, why do I calculate the reward starting from the closing of the next candle instead of the current one in which the action was indicated?

in code: trading_env.py

def step(self, action):
self._truncated = False
self._current_tick += 1

    if self._current_tick == self._end_tick:
        self._truncated = True

    step_reward = self._calculate_reward(action)
    self._total_reward += step_reward

why increase self._current_tick += 1 before reward?
shouldn't I reward him with the closing value of the candle in which this action was decided?

thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions