Trend Indicator optimisation

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #245196 quote
    herculeshercules
    Participant
    New

    Looking for code for indicator optimisation.   For a simplistic example  – I am looking for the code to run a routine to optimise which two moving average lookbacks to use to maximise the gains from a moving average crossover strategy.

    #245198 quote
    JSJS
    Participant
    Master

    Here is a simple “CrossOver” system that can be optimized…
    You have two optimization parameters here: “FastPeriod” and “SlowPeriod”…
    Import the “itf-file” (in the section “BackTesting & Auto Trading”)…

    DefParam CumulateOrders=False //no cumulating orders
    
    FastAvg=Average[FastPeriod](Close)//Fast Average
    SlowAvg=Average[SlowPeriod](Close)//Slow Average
    
    If FastAvg Crosses Over SlowAvg then
    Buy 1 contract at Market
    EndIf
    
    If FastAvg Crosses Under SlowAvg then
    SellShort 1 contract at Market
    EndIf
    
    Iván González and robertogozzi thanked this post
    Scherm­afbeelding-2025-03-24-om-12.06.01.png Scherm­afbeelding-2025-03-24-om-12.06.01.png Example-CrossOver-System.itf
    #245224 quote
    LucasBestLucasBest
    Participant
    Senior

    i think he wants a code that optimize itself… something like Nicolas with HalfTrend adaptive length.

    Fifty shades of Half Trend indicator

Viewing 3 posts - 1 through 3 (of 3 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

Trend Indicator optimisation


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
hercules @hercules Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by LucasBestLucasBest
1 year, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/24/2025
Status: Active
Attachments: 2 files
ProRealCode ProRealCode
Loading...