NexusFi: Find Your Edge


Home Menu

 





STACKED EMAS


Discussion in TradeStation

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




 
Search this Thread
  #1 (permalink)
nzbr
Medellin,Colombia
 
Posts: 2 since Apr 2021
Thanks Given: 0
Thanks Received: 1

Hi im new in this website and new programing
at easylanguahe, im trying to get a code how plot in radar
screen ifs emas ares stacked or not

I dont know how to compare 3 in the same condition, always get return weirds/no corrects values from the condition

inputs:
FastPrice( Close ) [DisplayName = "FastPrice", ToolTip =
"Enter an EasyLanguage expression to use in calculation of shorter length moving average."],
MedPrice( Close ) [DisplayName = "MedPrice", ToolTip =
"Enter an EasyLanguage expression to use in calculation of medium length moving average."],
SlowPrice( Close ) [DisplayName = "SlowPrice", ToolTip =
"Enter an EasyLanguage expression to use in calculation of longer length moving average."],
FastLength( 8 ) [DisplayName = "FastLength", ToolTip =
"Enter number of bars to use in calculation of shorter length moving average."],
MedLength( 21 ) [DisplayName = "MedLength", ToolTip =
"Medium Length. Enter number of bars to use in calculation of medium length moving average."],
SlowLength( 34 ) [DisplayName = "SlowLength", ToolTip =
"Enter number of bars to use in calculation of longer length moving average."];

variables:
FastAvg( 0 ),
MedAvg( 0 ),
SlowAvg( 0 ),
Bullcase( false ),
Bearcase( false );

FastAvg = XAverage( FastPrice, FastLength );
MedAvg = XAverage( MedPrice, MedLength );
SlowAvg = XAverage( SlowPrice, SlowLength );

Bullcase = Close > FastAvg and FastAvg > MedAvg
and MedAvg > SlowAvg;

Bearcase = Close < FastAvg and FastAvg < MedAvg
and MedAvg < SlowAvg;


if Bullcase and
Bullcase[1] = false then
Plot1("Bullish","Status",Black,green);



if Bearcase and
Bearcase[1] = false then
Plot1("Bearish","Status",Black,red);

when i try this nothing happens on radar screen but when i add an else always print the else condition (else for choppy condition)

if Bullcase and
Bullcase[1] = false then
Plot1("Bullish","Status",Black,green)
Else
Plot1("Choppy","Status",Black,Yellow);



if Bearcase and
Bearcase[1] = false then
Plot1("Bearish","Status",Black,red)
Else
Plot1("Choppy","Status",Black,Yellow);


please can anyone help me?

THX!


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
Datafeed for Atas
Platforms and Indicators
No book, only a stair: journaling fills where price move …
Cryptocurrency
Trump Media to sell instant access to market-moving soci …
Traders Hideout
EA
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
BERN ALGOS algo trading journal
3 thanks
NexusFi site changelog and issues/problem reporting
2 thanks
TopStep Trader disappointment
2 thanks
Want your NinjaTrader indicator created, free?
1 thanks
Running trading strategies on a VPS
1 thanks
  #2 (permalink)
 TraderDoc2 
Plainview
 
Experience: Intermediate
Platform: TradeStation
Broker: TradeStation
Trading: Futures
Posts: 37 since Mar 2012
Thanks Given: 2
Thanks Received: 22

I actually don't use Radar Screen and don't have any experience with it for looking at indicators. However, I looked at some tutorials and made an attempt at doing something like this. I'm not getting anything to plot, but it is the weekend. I don't know if Radar Screen indicators only work during the trading day, in which case my indicator might still work. You can try it anyway and revise as you see fit.

 
Code
inputs:
FastPrice( Close ) [DisplayName = "FastPrice", ToolTip =
"Enter an EasyLanguage expression to use in calculation of shorter length moving average."],
MedPrice( Close ) [DisplayName = "MedPrice", ToolTip =
"Enter an EasyLanguage expression to use in calculation of medium length moving average."],
SlowPrice( Close ) [DisplayName = "SlowPrice", ToolTip =
"Enter an EasyLanguage expression to use in calculation of longer length moving average."],
FastLength( 8 ) [DisplayName = "FastLength", ToolTip =
"Enter number of bars to use in calculation of shorter length moving average."],
MedLength( 21 ) [DisplayName = "MedLength", ToolTip =
"Medium Length. Enter number of bars to use in calculation of medium length moving average."],
SlowLength( 34 ) [DisplayName = "SlowLength", ToolTip =
"Enter number of bars to use in calculation of longer length moving average."];

variables:
FastAvg( 0 ),
MedAvg( 0 ),
SlowAvg( 0 ),
Bullcase( false ),
Bearcase( false ),
NewBull( false ),
NewBear( false);

FastAvg = XAverage( FastPrice, FastLength );
MedAvg = XAverage( MedPrice, MedLength );
SlowAvg = XAverage( SlowPrice, SlowLength );

Bullcase = Close > FastAvg and FastAvg > MedAvg
and MedAvg > SlowAvg;

Bearcase = Close < FastAvg and FastAvg < MedAvg
and MedAvg < SlowAvg;

if Bullcase then Begin
	If Bullcase[1] = False then 
	begin
		Plot1("Bull Stack","BullState",White,green);
		NewBull = true;
		Plot2("1st Bull","NewBull",Black,green);
		Alert(!("New Bullish State"));
	end			
Else
	begin
		Plot1("Bull Stack","BullState",White,green);
		NewBull = false;
		Plot2("1st Bull","NewBull",Red);	
	end;
end;
		
if Bearcase then Begin
	If Bearcase[1] = False then 
	begin
		Plot3("Bear Stack","BearState",White,green);
		NewBear = true;
		Plot4("1st Bear","NewBear",Black,green);
		Alert(!("New Bearish State"));
	end			
Else
	begin
		Plot3("Bear Stack","BearState",White,green);
		NewBear = false;
		Plot4("1st Bear","NewBear",Red);	
	end;
end;


Follow me on X Reply With Quote




Last Updated on May 9, 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