NexusFi: Find Your Edge


Home Menu

 





Indicator Issue - Radar Screen


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
Basti203
The Hague, Netherlands
 
Posts: 2 since Feb 2022
Thanks Given: 0
Thanks Received: 0

Hi guys,

I made a COT Oscillator based on the COT NET Position Indicator.
On the chart it works perfectly fine, however on the RadarScreen I only see numbers 0 or 100.
Does someone have an idea what the issue might be?
I tried adjusting the RadarScreen with "load additional bars" but didn't work...

Many thanks in advance for your help!!

here a picture and the code:

 
Code
 
Code
using elsystem; 
 
input:   
	int FuturesOnly_Or_FuturesAndOptions_1_or_2( 1 ) [ 
		DisplayName = "FuturesOnly_Or_FuturesAndOptions_1_or_2",  
		ToolTip = "Enter 1 to use the 'futures only' report;  enter 2 to use the 'futures and options' report."], 
		 weeks_back(34);  
 
variables: 
	bool Initialized( false ), 
	string FieldNamePrefix( "" ), 
	string CommLongFieldNme( "" ), 
	string CommShortFieldNme( "" ), 
	string NonCommLongFieldNme( "" ), 
	string NonCommShortFieldNme( "" ), 
	string SpecLongFieldNme( "" ), 
 	string SpecShortFieldNme( "" ), 
    double CommLong( 0 ), 
	double oCommLongErr( 0 ), 
	double CommShort( 0 ), 
	double oCommShortErr( 0 ), 
	double NonCommLong( 0 ), 
	double oNonCommLongErr( 0 ), 
	double NonCommShort( 0 ), 
	double oNonCommShortErr( 0 ), 
	double SpecLong( 0 ), 
	double oSpecLongErr( 0 ), 
	double SpecShort( 0 ), 
	double oSpecShortErr( 0 ), 
	double CommNet( 0 ), 
	double NonCommNet( 0 ), 
	double SpecNet( 0 ), 
	double Min_Net_C (0),  
	double Max_Net_C (0),  
	double COM_Index (0),  
	double LS_Index (0),  
	double SS_Index (0), 
	double Min_Net_LS(0), 
	double Max_Net_LS(0),  
	double Min_Net_SS(0), 
	double Max_Net_SS(0); 
 
if Initialized = false then 
begin 
	if Category > 0 then 
		throw Exception.Create( !( "Commitments of Traders studies can be applied only to futures symbols." ) ); 
	 
	Initialized = true; 
	 
	if FuturesOnly_Or_FuturesAndOptions_1_or_2 = 1 then 
		FieldNamePrefix = "COTF-" 
	else 
		FieldNamePrefix = "COTC-"; 
	 
	CommLongFieldNme = FieldNamePrefix + "12"; 
	CommShortFieldNme = FieldNamePrefix + "13"; 
	NonCommLongFieldNme = FieldNamePrefix + "9"; 
	NonCommShortFieldNme = FieldNamePrefix + "10"; 
	SpecLongFieldNme = FieldNamePrefix + "16"; 
 	SpecShortFieldNme = FieldNamePrefix + "17";	 
end; 
 
CommLong = FundValue( CommLongFieldNme, 0, oCommLongErr ); 
CommShort = FundValue( CommShortFieldNme, 0, oCommShortErr); 
NonCommLong = FundValue( NonCommLongFieldNme, 0, oNonCommLongErr ); 
NonCommShort = FundValue( NonCommShortFieldNme, 0, oNonCommShortErr ); 
SpecLong = FundValue( SpecLongFieldNme, 0, oSpecLongErr );  
SpecShort = FundValue( SpecShortFieldNme, 0, oSpecShortErr ); 
 
if oCommLongErr = fdrOk and oCommShortErr = fdrOk then 
begin 
	CommNet = CommLong - CommShort; 
	Min_Net_C = (Lowest (CommNet, weeks_back));  
	Max_Net_C = (Highest (CommNet, weeks_back));  
	COM_Index = IFF(Max_Net_C - Min_Net_C <>0, 100*(CommNet - Min_Net_C) / (Max_Net_C - Min_Net_C),1);  
	Plot1( COM_Index, !( "Comm" ) ); 
end; 
 
if oNonCommLongErr = fdrOk and oNonCommShortErr = fdrOk then 
begin 
	NonCommNet = NonCommLong - NonCommShort; 
	Min_Net_LS = (Lowest (NonCommNet, weeks_back));  
	Max_Net_LS = (Highest (NonCommNet, weeks_back));  
	LS_Index = IFF(Max_Net_LS - Min_Net_LS <>0, 100*(NonCommNet - Min_Net_LS) / (Max_Net_LS - Min_Net_LS),1);  
	Plot2( LS_Index, !( "LargeSpec" ) ); 
end; 
 
if oSpecLongErr = fdrOk and oSpecShortErr = fdrOk then 
begin 
	SpecNet = SpecLong - SpecShort; 
	Min_Net_SS = (Lowest (SpecNet, weeks_back));  
	Max_Net_SS = (Highest (SpecNet, weeks_back));  
	SS_Index = IFF(Min_Net_SS - Max_Net_SS <>0, 100*(SpecNet - Min_Net_SS) / (Max_Net_SS - Min_Net_SS),1);   
	Plot3( SS_Index, !( "SmallSpec" ) );  
end;


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Warsh Confirmed 54-45 on PPI Day -- 97% Say He Holds in …
Prediction Markets & Event Contracts
NinjaTrader Parent Payward Acquires Bitnomial for $550M …
Platforms and Indicators
Saylors 41-Month HODL Breaks: Strategy Sells 32 BTC as $ …
Prediction Markets & Event Contracts
Iran Peace Expired NO: Ceasefire on Life Support, OPEC a …
Prediction Markets & Event Contracts
Irans Answer Due Today: Peace Surges to 33.5%, Invasion …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
21 thanks
2026 Jlab journal
10 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Lady Vols Primer: Trading Volatility Journal
6 thanks
2026 Fire Horse
5 thanks
  #2 (permalink)
 
paps's Avatar
 paps 
SF Bay Area + CA/US
Market Wizard
 
Experience: None
Platform: TS, TOS, Ninja(Analytics)
Trading: NQ CL, ES when volatile mrkts
Posts: 1,742 since Oct 2011
Thanks Given: 2,176
Thanks Received: 1,727


Basti203 View Post
Hi guys,

I made a COT Oscillator based on the COT NET Position Indicator.
On the chart it works perfectly fine, however on the RadarScreen I only see numbers 0 or 100.
Does someone have an idea what the issue might be?
I tried adjusting the RadarScreen with "load additional bars" but didn't work...

Many thanks in advance for your help!!

here a picture and the code:

 
Code
 
Code
using elsystem; 
 
input:   
	int FuturesOnly_Or_FuturesAndOptions_1_or_2( 1 ) [ 
		DisplayName = "FuturesOnly_Or_FuturesAndOptions_1_or_2",  
		ToolTip = "Enter 1 to use the 'futures only' report;  enter 2 to use the 'futures and options' report."], 
		 weeks_back(34);  
 
variables: 
	bool Initialized( false ), 
	string FieldNamePrefix( "" ), 
	string CommLongFieldNme( "" ), 
	string CommShortFieldNme( "" ), 
	string NonCommLongFieldNme( "" ), 
	string NonCommShortFieldNme( "" ), 
	string SpecLongFieldNme( "" ), 
 	string SpecShortFieldNme( "" ), 
    double CommLong( 0 ), 
	double oCommLongErr( 0 ), 
	double CommShort( 0 ), 
	double oCommShortErr( 0 ), 
	double NonCommLong( 0 ), 
	double oNonCommLongErr( 0 ), 
	double NonCommShort( 0 ), 
	double oNonCommShortErr( 0 ), 
	double SpecLong( 0 ), 
	double oSpecLongErr( 0 ), 
	double SpecShort( 0 ), 
	double oSpecShortErr( 0 ), 
	double CommNet( 0 ), 
	double NonCommNet( 0 ), 
	double SpecNet( 0 ), 
	double Min_Net_C (0),  
	double Max_Net_C (0),  
	double COM_Index (0),  
	double LS_Index (0),  
	double SS_Index (0), 
	double Min_Net_LS(0), 
	double Max_Net_LS(0),  
	double Min_Net_SS(0), 
	double Max_Net_SS(0); 
 
if Initialized = false then 
begin 
	if Category > 0 then 
		throw Exception.Create( !( "Commitments of Traders studies can be applied only to futures symbols." ) ); 
	 
	Initialized = true; 
	 
	if FuturesOnly_Or_FuturesAndOptions_1_or_2 = 1 then 
		FieldNamePrefix = "COTF-" 
	else 
		FieldNamePrefix = "COTC-"; 
	 
	CommLongFieldNme = FieldNamePrefix + "12"; 
	CommShortFieldNme = FieldNamePrefix + "13"; 
	NonCommLongFieldNme = FieldNamePrefix + "9"; 
	NonCommShortFieldNme = FieldNamePrefix + "10"; 
	SpecLongFieldNme = FieldNamePrefix + "16"; 
 	SpecShortFieldNme = FieldNamePrefix + "17";	 
end; 
 
CommLong = FundValue( CommLongFieldNme, 0, oCommLongErr ); 
CommShort = FundValue( CommShortFieldNme, 0, oCommShortErr); 
NonCommLong = FundValue( NonCommLongFieldNme, 0, oNonCommLongErr ); 
NonCommShort = FundValue( NonCommShortFieldNme, 0, oNonCommShortErr ); 
SpecLong = FundValue( SpecLongFieldNme, 0, oSpecLongErr );  
SpecShort = FundValue( SpecShortFieldNme, 0, oSpecShortErr ); 
 
if oCommLongErr = fdrOk and oCommShortErr = fdrOk then 
begin 
	CommNet = CommLong - CommShort; 
	Min_Net_C = (Lowest (CommNet, weeks_back));  
	Max_Net_C = (Highest (CommNet, weeks_back));  
	COM_Index = IFF(Max_Net_C - Min_Net_C <>0, 100*(CommNet - Min_Net_C) / (Max_Net_C - Min_Net_C),1);  
	Plot1( COM_Index, !( "Comm" ) ); 
end; 
 
if oNonCommLongErr = fdrOk and oNonCommShortErr = fdrOk then 
begin 
	NonCommNet = NonCommLong - NonCommShort; 
	Min_Net_LS = (Lowest (NonCommNet, weeks_back));  
	Max_Net_LS = (Highest (NonCommNet, weeks_back));  
	LS_Index = IFF(Max_Net_LS - Min_Net_LS <>0, 100*(NonCommNet - Min_Net_LS) / (Max_Net_LS - Min_Net_LS),1);  
	Plot2( LS_Index, !( "LargeSpec" ) ); 
end; 
 
if oSpecLongErr = fdrOk and oSpecShortErr = fdrOk then 
begin 
	SpecNet = SpecLong - SpecShort; 
	Min_Net_SS = (Lowest (SpecNet, weeks_back));  
	Max_Net_SS = (Highest (SpecNet, weeks_back));  
	SS_Index = IFF(Min_Net_SS - Max_Net_SS <>0, 100*(SpecNet - Min_Net_SS) / (Max_Net_SS - Min_Net_SS),1);   
	Plot3( SS_Index, !( "SmallSpec" ) );  
end;

you may wish to also post in the TS forums, where many talk of development and indicators


Reply With Quote
  #3 (permalink)
 Anka Software   is a Vendor
 
Posts: 19 since Jan 2013
Thanks Given: 0
Thanks Received: 9


Whats the idea behind placing the plot names in a "!( )"?
Plot1( COM_Index, !( "Comm" ) );

Try
Plot1( COM_Index, "Comm" );


Reply With Quote




Last Updated on April 2, 2022


© 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