a little help with this system with a CALL

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31167 quote
    Paris
    Participant
    Veteran

    hi all

    i found this indicator

    //premier stochastic2
    
    len=8
    per=5
    stoc=Stochastic[len,1](close)
    nsto=0.1*(stoc-50)
    ssto=exponentialaverage[per](nsto)
    sssto=exponentialaverage[per](ssto)
    prem=(EXP(sssto)-1)/(exp(sssto)+1)
    cond1=prem<.9 and prem[1]>.9
    cond2=prem<.2 and prem[1]>.2
    cond3=prem>-.9 and prem[1]<-.9
    cond4=prem>-.2 and prem[1]<-.2
    condha=(cond1 or cond2)*.2
    condvte=(cond3 or cond4)*-.2
    return prem, .9, .2, -.9, -.2,condha, condvte
    #31168 quote
    Paris
    Participant
    Veteran

    and i have this backtest which it call it but it does not work ….

     

    aa= 4
    bb=aa*2
    REM Achat
    ignored, ignored, ignored, ignored, ignored, indic1, indic2= CALL "premier stochastic2"
    c1 = (indic1 > -0.1)
    IF c1 and not onmarket THEN
    BUY 1 contract AT MARKET
    pr=tradeprice(1)
    tg=pr*(1+bb)
    st=pr*(1-aa)
    ENDIF
    sell at st stop
    sell at tg limit
    
    REM Vente à découvert
    c2 = (indic2 < 0.1)
    IF c2 and not onmarket THEN
    SELLSHORT 1 contract AT MARKET
    prv=tradeprice(1)
    tgv=prv*(1-bb)
    stv=prv*(1+aa)
    ENDIF
    exitshort at stv stop
    exitshort at tgv limit
    
    #31169 quote
    Paris
    Participant
    Veteran

    can anyone  debug it please , i ve change some things in it , butit nor working yet .

     

    original code is from hk lisse site ….

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

a little help with this system with a CALL


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Paris @ladefense Participant
Summary

This topic contains 2 replies,
has 1 voice, and was last updated by Paris
9 years, 5 months ago.

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