OSCILLATOR FOR EXIT SIGNAL

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #109515 quote
    sideney
    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
    Nicolas
    Keymaster
    Master

    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
    sideney
    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
    Nicolas
    Keymaster
    Master

    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
    jebus89
    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.

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 jebus89
6 years, 4 months ago.

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