SuperTrendXX- Japan 225 Daily TF

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

    // Definition of code parameters
    DEFPARAM CumulateOrders = False // Cumulating positions deactivated
    // Cancel all pending orders and close all positions at the “FLATAFTER” time
    DEFPARAM FLATAFTER = 234500

    // Prevents the system from placing new orders on specified days of the week
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0

    // Conditions to enter long positions
    indicator1 = SuperTrend[1.6,4]
    c1 = (close > indicator1)
    indicator2 = SuperTrend[1.3,2]
    c2 = (close > indicator2)
    c3 = (close > close[1])

    IF (c1 AND c2 AND c3) AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF

    // Conditions to exit long positions
    indicator3 = SuperTrend[1.6,4]
    c4 = (close CROSSES UNDER indicator3)
    indicator4 = SuperTrend[1.3,2]
    c5 = (close CROSSES UNDER indicator4)

    IF c4 AND c5 THEN
    SELL AT MARKET
    ENDIF

    // Conditions to enter short positions
    indicator5 = SuperTrend[1.6,4]
    c6 = (close <= indicator5)
    indicator6 = SuperTrend[1.3,2]
    c7 = (close <= indicator6)
    c8 = (close < close[1])

    IF (c6 AND c7 AND c8) AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF

    // Conditions to exit short positions
    indicator7 = SuperTrend[1.6,4]
    c9 = (close CROSSES OVER indicator7)
    indicator8 = SuperTrend[1.3,2]
    c10 = (close CROSSES OVER indicator8)

    IF c9 AND c10 THEN
    EXITSHORT AT MARKET
    ENDIF

    // Stops and targets
    SET STOP pTRAILING 30
    SET TARGET pPROFIT 120

    supertrend-japan-1503770442cp84l.jpg supertrend-japan-1503770442cp84l.jpg
    #44971 quote
    Despair
    Blocked
    Master

    Zero bars, over zero bars. This won’t work.

    #45085 quote
    LancerX
    Participant
    Junior

    I am running it on test mode  since 25 August with 2 consecutive wins fro Japan 225 and Wall Street. Any comments to optimized the code will be highly appreciated.

    Super-Trend-Result-31.8.jpg Super-Trend-Result-31.8.jpg
    #45089 quote
    Nicolas
    Keymaster
    Master

    Hi LancerX, thanks for sharing your code. @despair was pointing the fact that you have backtested the strategy without the tick by tick mode which is the best way to validate the results. Did you tried with tick mode?

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

SuperTrendXX- Japan 225 Daily TF


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
LancerX @rpcasanas30779 Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by Nicolas
8 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 08/30/2017
Status: Active
Attachments: 2 files
Logo Logo
Loading...