Welcome to the BEST forum for traders

Did you know we're sharing tons of exclusive content here?
Our community is growing quickly. Take a look around and say "Hello".

TradingView tester inaccurate

Feb 21, 2021 - 1:53 PM

Viewed 746 times

https://best-trading-indicator.com/community/bti/forums/4180/topics/22924 COPY
  • Hi!

    I'd like to know if you can help me with this annoying issue because TradingView tester is so inaccurate.
    I've coded a strategy so that it closes my trade once price crosses down the sma[1]. But I've realised it doesn't work as expected.

    My condition is:

    if (strategy.position_size>0)
    strategy.exit(id=buy, stop=sma1[1])

    As you can see in the image, it doesn't close those longs when it should have done it.

    Thanks so much for your help.

    Have a good day!

    TV.png

    0
  • Hello

    Did you try with the strategy setting to enable the calculations at every real-time tick?

    TradingView calculate at every tick

    Dave

    0
  • or maybe try playing with the recalculate checkboxes + doing this

    // replacing sma1[1] by sma1
    if (strategy.position_size>0)
       strategy.exit(id=buy, stop=sma1)
    
    0
CONTENTS