Germany 40 at 3 Min PSAR indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #206208 quote
    maleczek
    Participant
    Junior

    Hi and Seasons greetings to all,

    Your help please …

    I have a strategy that manually returns a modest income on the 5 Minute Germany 40 during the market open times but despite 179 plus attempts to program it using ProRealTime, I cannot get the program to do what the flowchart does.

    synopsis …

    Using the change of the PSAR from RED to GREEN – if there is  green PSAR and green first bar it is an indicator to set the upper threshold which I’ve called ‘loft’ to (HIGH + 2*POINTSIZE).

    Then if  any of the following bars, before the next PSAR change is higher than ‘loft’ the program will BUY AT MARKET with a TARGET 20 and STOP 40.

    Likewise if the change of the PSAR is from GREEN to RED – if there is a red PSAR and a red first bar it is an indicator to set the lower threshold which I have called ‘dell’ to (LOW – 2*POINTSIZE).

    Then if any of the following bars before the next PSAR change is lower than the ‘dell’ variable then the program will SELLSHORT AT MARKET with a TARGET 20 and STOP 40.

    ########   If the PSAR changes and the TARGET has not been met, then the position is closed so that the next bar can be checked for an indicator.  ##If the change of PSAR is not matched with a like coloured first bar then the following bars are ignored till the next PSAR change. #########

    I have tried using Multi Time Frames to buy and sell quickly at the PSAR change so that a new PSAR/Bar can be quickly exploited and have had mixed results using arrays to facilitate assigning variables in different timeframes.

    I have attached my flowchart and gratefully would welcome any ideas as I have spent so long on this …..  I know the manual method works (but is tedious to stare at the screen for 8 hours).

    Any help would be most welcome, thank you in anticipation.

    #206220 quote
    maleczek
    Participant
    Junior

    Hi again,

    In my haste I posted the DOW version of the flowchart – which works as does FTSE etc. but the GERMANY 40 is most consistent.

    Please find atttached the DAX flowchart,

    Sorry for the mistake,

    #206249 quote
    JS
    Participant
    Senior

    Hi @maleczek

    I started from your text but haven’t tested it yet…

    I have a headache now… 😉

    Regards Jaap

    DefParam CumulateOrders = False
    
    mySAR = SAR[0.02,0.02,0.2]
    
    //SAR changes from Red to Green and first Green Bar
    IF High[1] > mySAR[1] and Close > Open and NOT ShortonMarket THEN
    xLoft = High + 2*PointSize //Set xLoft
    Ignored = 0
    ElsIf High[1] > mySAR[1] and Close < Open then
    Ignored = 1
    Else
    ExitShort at Market
    EndIf
    
     If High > xLoft and Ignored = 0 then
    Buy 1 contract at Market
    Set Target pProfit 20 
    Set Stop pLoss 40
    Ignored = 1
    EndIf
    
    //SAR changes from Green to Red and first Red bar
    IF Low[1] < mySAR[1] and Close < Open and NOT LongOnMarket THEN
    xDell = Low - 2*PointSize //Set xDell
    Ignored = 0
    ElsIf Low[1] < mySAR[1] and Close > Open then
    Ignored = 1
    Else
    Sell at Market
    EndIf
    
    If Low < xDell and Ignored = 0 then
    SellShort 1 contract at Market
    Set Target pProfit 20
    Set Stop pLoss 40
    Ignored = 1
    ENDIF
    #206301 quote
    maleczek
    Participant
    Junior
    Sincere Thanks Jaap, I hope I didn’t cause the headache … Merry Christmas 🙂
    JS thanked this post
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Germany 40 at 3 Min PSAR indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
maleczek @maleczek Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by maleczek
3 years, 1 month ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/22/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...