OSCILLATOR FOR EXIT SIGNAL

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #109515 quote
    sideneysideney
    Participant
    New

    Hi,

    i would like to set an exit signal after N times that an oscillator (rsi,stochastic, etc), cross the zero level, and setting the exit to a maximum or minimum of said oscillator.

    Is it possible to do on proreal?

     

    thank you for the reply, best regards

    #109521 quote
    NicolasNicolas
    Keymaster
    Legend

    Yes sure, that kind of code should be ok to exit an order N bars after the RSI has crosses down the level 50 and now below 30.

    N = 10
    i = rsi[14]
    
    if i crosses under 50 then 
     start=barindex
    endif 
    
    if longonmarket and barindex-start>=N and i<30 then 
     sell at market 
    endif

    (not tested).

    #109522 quote
    sideneysideney
    Participant
    New

    Hi,

    i’m express myself bad. What i need is like this example. I got an enter signal from a cross, and then, i wanna put my exit signal equal to point 3 of my momentum indicator.

    dax.jpg dax.jpg
    #109524 quote
    NicolasNicolas
    Keymaster
    Legend

    Ok, but all I can see from your example is numbers on a chart, how do you expect I understand something from this? Why are there points 1,2 and 3? Are they necessary in your exit conditions or not?

    #109575 quote
    jebus89jebus89
    Participant
    Master

    I think what he means is that “if the oscillator crosses over “0” for the 3rd time, then sell/exit”.

    If long/short on market then:

    if oscillator crosses over for the 3rd time: Sell

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

OSCILLATOR FOR EXIT SIGNAL


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
sideney @sideney Participant
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by jebus89jebus89
6 years, 12 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/07/2019
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...