Pivots Points – Buy and sell short strategy

Viewing 2 posts - 16 through 17 (of 17 total)
  • Author
    Posts
  • #222827 quote
    robertogozzi
    Moderator
    Master

    Using GRAH and GRAPHONPRICE will help you locate any error:

    graphonprice mS2M
    graph tlmS2M
    graph tsmS2M

    as you can see from the attached pics, when your conditions are met trades are opened regularly, otherwise they are not.
    So it’s your confitions that are not met.
    Check if they are what you want.
    In line 238 you use AND, so both conditions must be met, while sometimes only one of them is.

    ConditionsOK.jpg ConditionsOK.jpg NOConditions.jpg NOConditions.jpg
    #223051 quote
    LaMaille
    Participant
    Junior

    Find it why, thank you Roberto.

    1 – The code uses the previous PP (1) so of course there were no trade taken in the mentioned levels today (0). Sorry 😉

    2 – But when i change the PP with (0) instead of (1) it gives a funny PP… How can i have it straight like the PRT one please?

    Thank you.

    Damien

    If you want the same pivot point as PRT, then use one of these codes below :

    IF (DAYOFWEEK=DAYOFWEEK[1] and DAYOFWEEK<>DAYOFWEEK[2] and dayofweek>1) or (DAYOFWEEK<>DAYOFWEEK[1] and dayofweek=0) then
    IF dayofweek <> 1 THEN
    PivotPoint  = (DHigh(1) + DLow(1) + DClose(1)) / 3
    DH=DHigh(1)
    DC = DClose(1)
    ENDIF
    If dayofweek=1 then
    PivotPoint  = (DHigh(2) + DLow(2) + DClose(2)) / 3
    endif
    endif
    ONCE HH = high
    ONCE LL = low
    ONCE CC = close
    IF (OpenTime = 010000 and dayofweek<>1) or (OpenTime = 000000 and dayofweek=0) THEN
    yHH = HH
    yLL = LL
    yCC = CC
    HH  = high
    LL  = low
    ENDIF
    HH = max(HH,high)
    LL = min(LL,low)
    CC = close
    Pivot = (yHH + yLL + yCC)/3
    Inertia thanked this post
Viewing 2 posts - 16 through 17 (of 17 total)
  • You must be logged in to reply to this topic.

Pivots Points – Buy and sell short strategy


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Inertia @inertia Participant
Summary

This topic contains 16 replies,
has 4 voices, and was last updated by LaMaille
2 years, 3 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 09/06/2023
Status: Active
Attachments: 11 files
Logo Logo
Loading...