NexusFi: Find Your Edge


Home Menu

 





High price during RSI oscillation


Discussion in EasyLanguage Programming

Updated
    1. trending_up 4,048 views
    2. thumb_up 2 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

High price during RSI oscillation

  #1 (permalink)
clockworkman
Akron, OH
 
Posts: 7 since Nov 2021
Thanks Given: 0
Thanks Received: 3

Hello

Using RSI oscillator. What would be the code to compare the price high while the oscillator is above 60 to the high price the next time the oscillator is above 60? The only caveat is I only want to compare the prices if during that period the the RSI oscillator travels below 30.

So if RSI is above 60....then drops below 60 but never gets below 30..I don't need to perform the price comparison. Hope that makes sense. Thank you for any help

Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Cheap historycal L1 data for stocks
Stocks and ETFs
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
artisanpro
montreal, qc, canada
 
Posts: 28 since May 2021
Thanks Given: 28
Thanks Received: 18

Hum, I have no clue as to what you want to do here: could you provide a sample chart with the areas you want to compare? Are you looking for divergence of the price and oscillator?

Reply With Quote
  #3 (permalink)
Kolnidrei
Lyon/France
 
Posts: 23 since Aug 2012
Thanks Given: 1
Thanks Received: 14


hi
 
Code
inputs:
RSIPeriod(10),
HighRSI(60),
LowRSI(30);
vars:
RSIValue,status(0),Previouslow(0),previoushigh(99999),
lowerPrice(false),higherPrice(false);

RSIValue = RSI(C, RSIPeriod);
condition1 = status = 0 and RSIValue crosses below LowRSI;
condition2 = status = 1 and RSIValue crosses above HighRSI;

if condition1 then begin
if L < Previouslow then lowerPrice = true else lowerPrice = false;
previouslow = L;
status = 1;
end;

if condition2 then begin
if H > Previoushigh then higherPrice = true else higherPrice = false;
previoushigh = H;
status = 0;
end;
with this code you should achieve on both sides what you wanted
for the long side only, so you can act according to the lowerPrice/higherPrice

Reply With Quote
Thanked by:




Last Updated on December 5, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts