Thinkscript and Z-Order... - ThinkOrSwim | futures io social day trading
futures io futures trading


Thinkscript and Z-Order...
Updated: Views / Replies:565 / 4
Created: by netarchitech Attachments:1

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
 

Thinkscript and Z-Order...

  #1 (permalink)
Trading Apprentice
NY, NY
 
Futures Experience: Intermediate
Platform: TOS
Favorite Futures: Stocks, ETFs
 
Posts: 30 since Dec 2011
Thanks: 19 given, 5 received

Thinkscript and Z-Order...

Is there any way to "z-order" the various elements in a study? More specifcally, I want to bring the yellow line and the white baseline "forward" so they lay on top of the green and red histograms, if possible. Currently, the histograms are "on top" and make the yellow line and white baseline look like they are dashed lines, as seen in the sample image below...

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


Any help/assistance would be greatly appreciated. Thanks in advance...

Reply With Quote
 
  #2 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received

The plot order is according to which one is first on the code. You have to move the plot text for the avg and zero line before the histogram plot in the thinkscript.

Reply With Quote
The following user says Thank You to rmejia for this post:
 
  #3 (permalink)
Trading Apprentice
NY, NY
 
Futures Experience: Intermediate
Platform: TOS
Favorite Futures: Stocks, ETFs
 
Posts: 30 since Dec 2011
Thanks: 19 given, 5 received


Thanks for your reply, rmejia. I understand. Unfortunately, since the yellow "avg" line is derived from the histograms, the plots cannot be reordered...

Reply With Quote
 
  #4 (permalink)
1.Fibs 2.??? 3.Profit
Puerto Rico
 
Futures Experience: Intermediate
Platform: thinkorswim
Broker/Data: TD Ameritrade
Favorite Futures: ES
 
rmejia's Avatar
 
Posts: 384 since Oct 2010
Thanks: 3,597 given, 421 received

Can you put the histogram formula on the avg plot ? I have a study where the avg was = ((h+l+c/3),ema period), the h and l being the histogram so I substituted those for instead of just using h to using what h was equal to.

So to move it infront of the histogram plot the formula changed to:
plot ave = expAverage((high("$TICK")+low("$TICK")+close("$TICK"))/3,emaPeriod);

from
plot ave = expAverage(h+l+c)/3,emaPeriod);

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


Last edited by rmejia; February 19th, 2015 at 08:56 AM.
Reply With Quote
The following user says Thank You to rmejia for this post:
 
  #5 (permalink)
Trading Apprentice
NY, NY
 
Futures Experience: Intermediate
Platform: TOS
Favorite Futures: Stocks, ETFs
 
Posts: 30 since Dec 2011
Thanks: 19 given, 5 received

Thank you, rmejia, for your reply and continuing assistance. It is certainly appreciated. As for the element ordering, I received the answer I needed from a fellow scripter on another forum...

It turns out that the plots can be reordered as necessary, but it requires defining (def) certain plots ahead of time, so to speak. I hope that makes sense, but if not, below are code snippets that hopefully do a better job than I

Below is a snippet from the original code:

 
Code
plot "DI+" = 100 * MovingAverage(averageType, plusDM, length) / ATR;
"DI+".SetDefaultColor(color.DARK_GREEN);
"DI+".SetLineWeight(3);
"DI+".SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

plot "DI-" = 100 * MovingAverage(averageType, minusDM, length) / ATR;
"DI-".SetDefaultColor(color.RED);
"DI-".SetLineWeight(3);
"DI-".SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

def DX = if ("DI+" + "DI-" > 0) then 100 * AbsValue("DI+" - "DI-") / ("DI+" + "DI-") else 0;

plot ADX = MovingAverage(averageType, DX, length);
ADX.SetDefaultColor(GetColor(4));
ADX.SetLineWeight(3);

plot "20Line" = 20;
"20Line".SetDefaultColor(GetColor(9));
"20Line".SetLineWeight(1);

And below is the updated code snippet:

 
Code
plot "20Line" = 20;
"20Line".SetDefaultColor(GetColor(9));
"20Line".SetLineWeight(1);

def DIplus  = 100 * MovingAverage(averageType, plusDM, length) / ATR;
def DIminus = 100 * MovingAverage(averageType, minusDM, length) / ATR;
def DX = if (DIplus + DIminus > 0) then 100 * AbsValue(DIplus - DIminus) / (DIplus + DIminus) else 0;

plot ADX = MovingAverage(averageType, DX, length);
ADX.SetDefaultColor(GetColor(4));
ADX.SetLineWeight(3);

plot "DI+" = DIplus;
"DI+".SetDefaultColor(color.DARK_GREEN);
"DI+".SetLineWeight(3);
"DI+".SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
"DI+".HideBubble();
"DI+".HideTitle();

plot "DI-" = DIminus;
"DI-".SetDefaultColor(color.RED);
"DI-".SetLineWeight(3);
"DI-".SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
"DI-".HideBubble();
"DI-".HideTitle();

I hope this proves informative/helpful to any/all whom might be interested...

Reply With Quote

Reply



futures io > > > > Thinkscript and Z-Order...

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Webinar: Order Book Strategies and Order Flow Patterns w/Ferran Ramentol and VeloxPro Big Mike Traders Hideout 44 August 5th, 2017 05:42 PM
Programming another limit order if order isn't filled? ericson NinjaTrader Programming 5 January 28th, 2014 06:50 AM
ATM Strategy: Limit order & stop loss order at the same time in the market? DrE6 NinjaTrader 2 June 21st, 2013 02:12 PM
Time of Order Submission Limit Calculation / Conditional / Price Improvement Order CoopGeko IB Trader Workstation 0 September 17th, 2012 10:15 PM
Order entering at lower volume (ETH-RTH times) - Position Sizing / Order Type Koepisch Traders Hideout 4 August 22nd, 2012 05:12 PM


All times are GMT -4. The time now is 05:53 AM.

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-11 in 0.10 seconds with 20 queries on phoenix via your IP 54.82.79.109