Parabolic SAR

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #71026 quote
    fredrikfx
    Participant
    Junior

    Hello!

    How do I define the code to enter a trade when Parabolic SAR goes from green–>red and red–>green ?

    Thanks in advance

    #71045 quote
    Nicolas
    Keymaster
    Master

    What trigger the trend change (from green to red and vice-versa) of a Parabolic SAR is the Close breaks out its price level (the green or red dots). So to trigger an action (buy or sellshort contracts), a simple test of a cross over or cross under of the Close is sufficient.

    defparam cumulateorders=false
    
    mysar = SAR[0.02,0.02,0.2]
    
    if close crosses over mysar then 
    buy at market
    endif
    
    if close crosses under mysar then 
    sellshort at market 
    endif
    #71084 quote
    fredrikfx
    Participant
    Junior

    Thanks Nicolas

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Parabolic SAR


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
fredrikfx @fredrikfx Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by fredrikfx
7 years, 9 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/21/2018
Status: Active
Attachments: No files
Logo Logo
Loading...