Parabolic SAR Japan 225 4 hour

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #219538 quote
    jamesamonjamesamon
    Participant
    New
    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    
    // Conditions to enter long positions
    indicator1 = SAR[0.02,0.02,0.2]
    c1 = (indicator1 CROSSES UNDER close)
    
    IF c1 THEN
    BUY 1 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit long positions
    indicator2 = SAR[0.02,0.02,0.2]
    c2 = (indicator2 CROSSES OVER close)
    
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    
    // Conditions to enter short positions
    indicator3 = SAR[0.02,0.02,0.2]
    c3 = (indicator3 CROSSES OVER close)
    
    IF c3 THEN
    SELLSHORT 1 PERPOINT AT MARKET
    ENDIF
    
    // Conditions to exit short positions
    indicator4 = SAR[0.02,0.02,0.2]
    c4 = (indicator4 CROSSES UNDER close)
    
    IF c4 THEN
    EXITSHORT AT MARKET
    ENDIF
    
    // Stops and targets
    SET STOP pTRAILING 40
    capture-1692788834lpc48.png capture-1692788834lpc48.png capture-1692788834lpc48-1.png capture-1692788834lpc48-1.png
    #219570 quote
    NicolasNicolas
    Keymaster
    Legend

    Hi, thanks for sharing. But I think you didn’t add any spread (order fee) and made the backtest without the tick-by-tick checkbox ticked (verify in candlestick if stoploss or takeprofit is hit before the candlestick close).

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Parabolic SAR Japan 225 4 hour


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
jamesamon @jamesamon Participant
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by NicolasNicolas
3 years ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/23/2023
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...