NexusFi: Find Your Edge


Home Menu

 





High price during RSI oscillation


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #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?
Iran Update May 8: Still Reviewing MOU, Demands Reparati …
Traders Hideout
ATFX Suspends Prop Trading Unit ATFunded -- Full Review …
Funded Trading Evaluation Firms
Election Sunday Resolves: Peru Heads to Runoff at 42pct, …
Prediction Markets & Event Contracts
Powell in 48 Hours: Word Markets Give 78% on Inflation, …
Prediction Markets & Event Contracts
UMA Votes Tonight: Polymarkets $80M Strategy Bitcoin Bat …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
196 thanks
Sober Journey With S&P
27 thanks
30 Sessions
20 thanks
BERN ALGOS algo trading journal
8 thanks
Volume Indicators
8 thanks
  #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


© 2026 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 - Downloads - Top
no new posts