Multicharts Indicator Days over/under SMA - MultiCharts | futures io social day trading
futures io futures trading


Multicharts Indicator Days over/under SMA
Updated: Views / Replies:1,343 / 16
Created: by venatrix Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Multicharts Indicator Days over/under SMA

  #11 (permalink)
Elite Member
Aschaffenburg
 
Futures Experience: Beginner
Platform: NinjaTrader, Multicharts
Favorite Futures: ES
 
Posts: 15 since Feb 2012
Thanks: 4 given, 1 received

Hello ABCTG,

thank you again, I have a solution and only need a small tip to finish.

Everything looks good:

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Here is the Code:

 
Code
{
Mai 2015
This Indicator tracks the Bars over or under the SMA.
}

inputs:
	Price		( Close ),
	SmaLength	( 21 ),
	Displace	( 0 ) ;

variables:
	SMAv		( 0 ),
	TrackingHi	( 0 ),
	TrackingLo	( 0 ),
	HiDate		( 0 ),
	LoDate		( 0 ),
	move 		( 0 );
	
SMAv = Average( Price, SmaLength );

if Close < SMAv then
begin 
//check if previous bar was also below the average, otherwise set the counter to -
  	if close [1] < SMAv [1] then
  	move = move -1
  	else 
   	move = -1; 
   	
   	if move < TrackingLo then
   	TrackingLo = move
   	else
   	TrackingLo = TrackingLo;
   	
   	if TrackingLo < TrackingLo [1] then
   	LoDate = Date;
   
end;


if Close > SMAv then
begin
//... do the same in here for the case where the close is above the ma
	
	if close [1] > SMAv [1] then
 	move = move + 1
 	else
  	move = +1;
  	
  	if move > TrackingHi then
  	TrackingHi = move
  	else
  	TrackingHi = TrackingHi;
  	
  	if TrackingHi > TrackingHi [1] then
  	HiDate = Date;
  	
end;

plot1(move,"Days over/under SMA 21");
plot2(TrackingHi, "max. Days over  SMA 21");
plot3(TrackingLo, "max. Days under SMA 21");
plot4(HiDate, "Hi Date ");
plot5(LoDate, "Lo Date ");


If Plot1 >=1 Then
  SetPlotColor(1, Green); 
If Plot1 <= -1 Then
  SetPlotColor(1, red);
 
ClearPrintLog;
Print( ELDateToString (D)," " , time_s2time(T), " TrackingHi ", TrackingHi, " TrackingLo ", TrackingLo, " HiDate ", ELDateToString (HiDate), " LoDate ", ELDateToString (LoDate)  );
I dont have a solution to format the date in the plot statement:

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Can you please help me?

Thanks again.

Best regards,
Timo

Reply With Quote
 
  #12 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 854 received
Forum Reputation: Legendary

Hi Timo,

how do you want to format the date? You can format dates with
 
Code
Date + 19000000
for example.

However when you have larger values together with small values you will likely have a scaling problem (which you can see on your second screenshot).

Regards,
ABCTG

Reply With Quote
 
  #13 (permalink)
Elite Member
Aschaffenburg
 
Futures Experience: Beginner
Platform: NinjaTrader, Multicharts
Favorite Futures: ES
 
Posts: 15 since Feb 2012
Thanks: 4 given, 1 received


Hi ABCTG,

I would like to format it like in the print statement:

MM/DD/YYYY

Is it possible to show the date in the Data window, but not in the indicator window on the chart
(to avoid the scaling problem)?

Thank you.

Best regards,
Timo

Reply With Quote
 
  #14 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 854 received
Forum Reputation: Legendary

You can display a plot as a string in the status window, but to be able to display a value in the data window is only doable when you plot it.
 
Code
Plot1( ElDateToString( Date ), "Date") ;
You can however simply set the indicator to be scaled from -100 to +100 for example or simply have an input that allows you to switch certain plots on and off - this way you'd load the indicator twice. One would plot the dates and the other the move values.

Regards,
ABCTG

Reply With Quote
 
  #15 (permalink)
Elite Member
Aschaffenburg
 
Futures Experience: Beginner
Platform: NinjaTrader, Multicharts
Favorite Futures: ES
 
Posts: 15 since Feb 2012
Thanks: 4 given, 1 received

Thanks ABCTG,

good idea to have an input to switch certain plots on and off, I add these this evening.

With

 
Code
plot4(ELDateToString( HiDate ) , "Hi Date ");
I have in the DataWindow N/A.

What is wrong here?

Thanks again.

Best regards,
Timo

Reply With Quote
 
  #16 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 854 received
Forum Reputation: Legendary


venatrix View Post
]
 
Code
plot4(ELDateToString( HiDate ) , "Hi Date ");
I have in the DataWindow N/A.

What is wrong here?

That's what I meant with " You can display a plot as a string in the status window, but to be able to display a value in the data window is only doable when you plot it.". I should have added [...] is only doable when you plot it as a value.

Regards,
ABCTG

Reply With Quote
 
  #17 (permalink)
Elite Member
Aschaffenburg
 
Futures Experience: Beginner
Platform: NinjaTrader, Multicharts
Favorite Futures: ES
 
Posts: 15 since Feb 2012
Thanks: 4 given, 1 received

Good morning ABCTG,

thank you for the clarification.

To avoid to load the indicator 2 times I simply set the indicator to be scaled from -100 to +100, that is ok for this
indicator.

I changed the variables HiDate = Date + 19000000 and LoDate = Date + 19000000, so I can read it in the Data Window, but that is not very nice. Any chance to format this better in the Data Window?

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


Thank you.

Best regards,
Timo

Reply With Quote

Reply



futures io > > > > Multicharts Indicator Days over/under SMA

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Looking for NT7 CCI Indicator based on EMA and not SMA Nemesis NinjaTrader 29 March 29th, 2016 05:41 PM
Extended ray for sma, vwap, trix etc. indicator (NT7) Peke5 The Elite Circle 4 October 23rd, 2014 07:21 AM
Idea: Wick-based SMA Indicator (WiSMA) rewex NinjaTrader 19 June 17th, 2013 11:10 AM
SMA + Standard Deviation Indicator dreart NinjaTrader 1 December 10th, 2012 08:13 PM
MultiCharts and IQfeed alignment with 120 days of Tick Data??? benharrell Reviews of Brokers and Data Feeds 36 June 11th, 2011 04:06 PM


All times are GMT -4. The time now is 08:56 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-14 in 0.10 seconds with 19 queries on phoenix via your IP 54.221.73.186