NexusFi: Find Your Edge


Home Menu

 





STACKED EMAS


Discussion in TradeStation

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




 
Search this Thread

STACKED EMAS

  #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?
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
The Program
18 thanks
Battlestations: Show us your trading desks!
18 thanks
  #2 (permalink)
 TraderDoc2 
Plainview
 
Experience: Intermediate
Platform: TradeStation
Broker: TradeStation
Trading: Futures
Posts: 34 since Mar 2012
Thanks Given: 1
Thanks Received: 21

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 Twitter Reply With Quote




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