Code Generating incorrect entry point

Forums ProRealTime English forum ProOrder support Code Generating incorrect entry point

Viewing 4 posts - 1 through 4 (of 4 total)
  • #232614

    I have an indicator which I copied from the Forums which generates a long entry signal

    So I thought I could use this in an Algo as below

    The algo generates an entry signal which is later than the indicator signal even though the code for the 2 is the same .

    Help please

    #232616

    An obvious reason would be that the Indicator generates “in bar” an Entry arrow (works at Tick level), which is not valid any more at the transition to the next bar with the longer timeframe (like 1 hour).

    Could that be the situation at hand ?

    #232618
    JS

    The indicator is “repainting”…

    When drawing the “DrawArrowUP”, the indicator uses a bar index (barrabasso) and a value (basso) that do not come from the “MACD crosses under” but from the “Low” values…

    This is where it goes wrong, the “Arrow” doesn’t use the values of the “Crosses Under” but of the “Low” value…

    If Low<basso then

    basso=low

    barrabasso=barindex

    EndIf

    If you don’t use this piece of code, you will get the same signals…

    1 user thanked author for this post.
    #232646

     

    Yes it is repainting. Takes my 88 year old brain a while to see these things sometimes.!

     

    1 user thanked author for this post.
    avatar JS
Viewing 4 posts - 1 through 4 (of 4 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login