Help my indicator plot on last bar - TradeStation | futures io social day trading
futures io futures trading


Help my indicator plot on last bar
Updated: Views / Replies:1,267 / 11
Created: by GoldenRatio Attachments:3

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
 3  
 
Thread Tools Search this Thread
 

Help my indicator plot on last bar

  #1 (permalink)
Elite Member
Philadelphia, PA
 
Futures Experience: Intermediate
Platform: Matlab, TradeStation
Favorite Futures: Stocks
 
GoldenRatio's Avatar
 
Posts: 179 since Aug 2012
Thanks: 4,556 given, 226 received

Help my indicator plot on last bar

Can somebody please tell me why my indicator is not plotting on the last bar?

For example, I would have expected a blue arrow to be plotted over the last bar as all the conditions are met?

I checked the scale range and it is set to "Expand Range to include Analysis Techniques" so it shouldn't be off the screen. Any ideas?

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

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

Reply With Quote
 
  #2 (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, 855 received
Forum Reputation: Legendary

GoldenRatio,

can you post the code in a code box? Also what chart symbol and chart setting did you use, so someone can reproduce it?
Is update intrabar checked or unchecked for your indicator?

Regards,
ABCTG


GoldenRatio View Post
Can somebody please tell me why my indicator is not plotting on the last bar?

For example, I would have expected a blue arrow to be plotted over the last bar as all the conditions are met?

I checked the scale range and it is set to "Expand Range to include Analysis Techniques" so it shouldn't be off the screen. Any ideas?

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

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


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #3 (permalink)
Elite Member
Philadelphia, PA
 
Futures Experience: Intermediate
Platform: Matlab, TradeStation
Favorite Futures: Stocks
 
GoldenRatio's Avatar
 
Posts: 179 since Aug 2012
Thanks: 4,556 given, 226 received


ABCTG, thanks for offering to help!

Yes update intrabar is checked. I am not sure what you mean when you ask "what chart symbol and chart setting did you use" as I am still earning the language and program.

 
Code
Using elsystem;
Using elsystem.drawing;
Using elsystem.drawingobjects;

Inputs:
	FontName("TradeStation"),
	UpChar("Q"),
	DnChar("A");
	
Vars:
	Font LabelFont(Null),
	TextLabel UpLabel(Null),
	TextLabel DnLabel(Null),
	SMA10Volume(0),
	Stock_Range(0);
	
SMA10Volume = Average(Volume,10);
Stock_Range = (Close-Low)/(High-Low);	

Once Begin
	LabelFont = Font.Create(FontName, 12);
End;
      
if Volume > SMA10Volume AND Close > Close[1] AND Stock_Range >= 0.50 then
Begin
	UpLabel = TextLabel.Create(DTPoint.Create(Bardatetime[0], High+3), UpChar);
	UpLabel.Font = LabelFont;
	UpLabel.HStyle = HorizontalStyle.center;
	UpLabel.VStyle = VerticalStyle.center;
	UpLabel.Color = color.Blue;
	DrawingObjects.Add(UpLabel);
End;

Reply With Quote
 
  #4 (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, 855 received
Forum Reputation: Legendary

I meant the symbol and bar interval settings that you used for the chart where your arrow should have appeared on the last bar.
It seems to be a daily chart, but what is the symbol?

Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #5 (permalink)
Elite Member
Philadelphia, PA
 
Futures Experience: Intermediate
Platform: Matlab, TradeStation
Favorite Futures: Stocks
 
GoldenRatio's Avatar
 
Posts: 179 since Aug 2012
Thanks: 4,556 given, 226 received


ABCTG View Post
I meant the symbol and bar interval settings that you used for the chart where your arrow should have appeared on the last bar.
It seems to be a daily chart, but what is the symbol?

Regards,
ABCTG

Symbol should be blue up arrow. I want it to run on both the daily and weekly chart time frames.

Reply With Quote
 
  #6 (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, 855 received
Forum Reputation: Legendary

The chart symbol. If I want to reproduce your chart picture you posted, what do I have to set up?

Chart symbol - for example SPY, MSFT, GOOG etc.
Barinterval - for example Daily, 2 Years back.


GoldenRatio View Post
Symbol should be blue up arrow. I want it to run on both the daily and weekly chart time frames.


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #7 (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, 855 received
Forum Reputation: Legendary

A good way to find out what is going within your code is by adding plots or print statements.
If you add this to the end of your code, it will add a plot to the chart showing +1 when your conditions are met and 0, when they are not. So you can easily see if the arrow is maybe just out of sight.
The print statement will output the values to the print log, so you can exactly see what is going on and why an arrow is missing.

Regards,
ABCTG

 
Code
if Volume > SMA10Volume AND Close > Close[1] AND Stock_Range >= 0.50 then
	Plot1( +1 )
else
	Plot1( 0 );

Print( ElDateToString( Date ), "; Volume: ", Volume, "; SMA10Volume: ", SMA10Volume, "; Close: ", Close, "; Close[1]: ", Close, "; Stock_Range: ", Stock_Range ) ;

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #8 (permalink)
Elite Member
Philadelphia, PA
 
Futures Experience: Intermediate
Platform: Matlab, TradeStation
Favorite Futures: Stocks
 
GoldenRatio's Avatar
 
Posts: 179 since Aug 2012
Thanks: 4,556 given, 226 received

Sorry for being so dense!

Symbol: ALXN
Barinterval: Daily


Last edited by GoldenRatio; October 25th, 2014 at 04:37 PM. Reason: Symbol typo
Reply With Quote
The following user says Thank You to GoldenRatio for this post:
 
  #9 (permalink)
Elite Member
Philadelphia, PA
 
Futures Experience: Intermediate
Platform: Matlab, TradeStation
Favorite Futures: Stocks
 
GoldenRatio's Avatar
 
Posts: 179 since Aug 2012
Thanks: 4,556 given, 226 received


ABCTG View Post
A good way to find out what is going within your code is by adding plots or print statements.
If you add this to the end of your code, it will add a plot to the chart showing +1 when your conditions are met and 0, when they are not. So you can easily see if the arrow is maybe just out of sight.
The print statement will output the values to the print log, so you can exactly see what is going on and why an arrow is missing.

Regards,
ABCTG

 
Code
if Volume > SMA10Volume AND Close > Close[1] AND Stock_Range >= 0.50 then
	Plot1( +1 )
else
	Plot1( 0 );

Print( ElDateToString( Date ), "; Volume: ", Volume, "; SMA10Volume: ", SMA10Volume, "; Close: ", Close, "; Close[1]: ", Close, "; Stock_Range: ", Stock_Range ) ;

I added the statement and it does show a value of 1 on the last bar.

If the arrow is out of sight, how do I set the chart to resize to automatically show indicator?

Reply With Quote
 
  #10 (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, 855 received
Forum Reputation: Legendary


GoldenRatio,

no worries. Your code is correctly working, good job. The arrow is just outside the visual area. You can check this by setting the symbol to center last price.
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Although this is not a good setting for charting. I would suggest trying to set the subgraph margins Lower and Upper to maybe 10%.

Regards,
ABCTG


GoldenRatio View Post
Sorry for being so dense!

Symbol: ALXN
Barinterval: Daily


Reply With Quote
The following user says Thank You to ABCTG for this post:

Reply



futures io > > > > Help my indicator plot on last bar

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
indicator will not plot MilfordT NinjaTrader 5 October 6th, 2014 07:46 PM
Heikin Ashi indicator with bar outline same color as bar? Todd NinjaTrader 29 September 7th, 2013 08:33 AM
Ninjatrader: plot a marker after x bar have passed since... johnlucas NinjaTrader Programming 4 October 20th, 2011 12:33 PM
Chart Bar with volume indicator inside Bar? hector24 NinjaTrader 11 October 9th, 2011 11:41 AM
plot axis reference for bar style SARdynamite NinjaTrader Programming 1 July 17th, 2010 07:02 AM


All times are GMT -4. The time now is 10:36 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-16 in 0.14 seconds with 20 queries on phoenix via your IP 54.227.51.103