Is it possible to group the MonkeyBars chart to display a week? - ThinkOrSwim | futures io social day trading
futures io futures trading


Is it possible to group the MonkeyBars chart to display a week?
Updated: Views / Replies:1,110 / 7
Created: by Yakito 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
 

Is it possible to group the MonkeyBars chart to display a week?

  #1 (permalink)
Trading Apprentice
Buenos Aires, Argentina
 
Futures Experience: Intermediate
Platform: NinjaTrader, TOS
Favorite Futures: ES
 
Posts: 47 since Jun 2013
Thanks: 39 given, 4 received

Is it possible to group the MonkeyBars chart to display a week?

Hello,

I been trying unsuccessfully to make a money bar chart grouped into weeks where each letter (or number in TOS) represents 1 hour.

I can't seem to be able to group the chart in anything else besides days, months and years.

Any tip? Thanks!

Reply With Quote
 
  #2 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

 
Code
input pricePerRowHeightMode = {default TICKSIZE, AUTOMATIC, CUSTOM};
input customRowHeight = 1.0;
input aggregationPeriod = {"1 min", "2 min", "3 min", "4 min", "5 min", "10 min", "15 min", "20 min", default "1 hour", "30 min", "2 hours", "4 hours", "Day", "2 Days", "3 Days", "4 Days", "Week", "Month"};
input timePerProfile = {default WEEK, MINUTE, HOUR, DAY, CHART, MONTH, "OPT EXP", BAR, YEAR};
input multiplier = 1;
input onExpansion = no;
input profiles = 10;
input showMonkeyBar = no;
input showThePlayground = no;
input thePlaygroundPercent = 95;
input opacity = 100;
input emphasizeFirstDigit = no;
input markOpenPrice = yes;
input markClosePrice = yes;
input volumeShowStyle = MonkeyVolumeShowStyle.NONE;
input showVolumeVA = no;
input showVolumePoc = no;
input theVolumePercent = 95;
input showInitialBalance = yes;
input initialBalanceRange = 3;

def period;
def yyyymmdd = getYyyyMmDd();
def seconds = secondsFromTime(0);
def month = getYear() * 12 + getMonth();
def day_number = daysFromDate(first(yyyymmdd)) + getDayOfWeek(first(yyyymmdd));
def dom = getDayOfMonth(yyyymmdd);
def dow = getDayOfWeek(yyyymmdd - dom + 1);
def expthismonth = (if dow > 5 then 27 else 20) - dow;
def exp_opt = month + (dom > expthismonth);
def periodMin = Floor(seconds / 60 + day_number * 24 * 60);
def periodHour = Floor(seconds / 3600 + day_number * 24);
def periodDay = countTradingDays(Min(first(yyyymmdd), yyyymmdd), yyyymmdd) - 1;
def periodWeek = Floor(day_number / 7);
def periodMonth = month - first(month);

switch (timePerProfile) {
case CHART:
    period = 0;
case MINUTE:
    period = periodMin;
case HOUR:
    period = periodHour;
case DAY:
    period = periodDay;
case WEEK:
    period = periodWeek;
case MONTH:
    period = periodMonth;
case "OPT EXP":
    period = exp_opt - first(exp_opt);
case BAR:
    period = barNumber() - 1;
case YEAR:
    period = getYear() - first(getYear());
}

def count = compoundvalue(1, if period != period[1] then (getValue(count, 1) + period - period[1]) % multiplier else getValue(count, 1), 0);
def cond = compoundvalue(1, count < count[1] + period - period[1], yes);
def height;
switch (pricePerRowHeightMode) {
case AUTOMATIC:
    height = PricePerRow.AUTOMATIC;
case TICKSIZE:
    height = PricePerRow.TICKSIZE;
case CUSTOM:
    height = customRowHeight;
}

def timeInterval;
def aggMultiplier;
switch (aggregationPeriod) {
case "1 min":
    timeInterval = periodMin;
    aggMultiplier = 1;
case "2 min":
    timeInterval = periodMin;
    aggMultiplier = 2;
case "3 min":
    timeInterval = periodMin;
    aggMultiplier = 3;
case "4 min":
    timeInterval = periodMin;
    aggMultiplier = 4;
case "5 min":
    timeInterval = periodMin;
    aggMultiplier = 5;
case "10 min":
    timeInterval = periodMin;
    aggMultiplier = 10;
case "15 min":
    timeInterval = periodMin;
    aggMultiplier = 15;
case "20 min":
    timeInterval = periodMin;
    aggMultiplier = 20;
case "30 min":
    timeInterval = periodMin;
    aggMultiplier = 30;
case "1 hour":
    timeInterval = periodHour;
    aggMultiplier = 1;
case "2 hours":
    timeInterval = periodHour;
    aggMultiplier = 2;
case "4 hours":
    timeInterval = periodHour;
    aggMultiplier = 4;
case "Day":
    timeInterval = periodDay;
    aggMultiplier = 1;
case "2 Days":
    timeInterval = periodDay;
    aggMultiplier = 2;
case "3 Days":
    timeInterval = periodDay;
    aggMultiplier = 3;
case "4 Days":
    timeInterval = periodDay;
    aggMultiplier = 4;
case "Week":
    timeInterval = periodWeek;
    aggMultiplier = 1;
case "Month":
    timeInterval = periodMonth;
    aggMultiplier = 1;
}

def agg_count = compoundvalue(1, if timeInterval != timeInterval[1] then (getValue(agg_count, 1) + timeInterval - timeInterval[1]) % aggMultiplier else getValue(agg_count, 1), 0);
def agg_cond = compoundvalue(1,  agg_count < agg_count[1] + timeInterval - timeInterval[1], yes);

def digit = compoundValue(1, if cond then 1 else agg_cond + getValue(digit, 1), 1);

profile monkey = monkeyBars(digit, "startNewProfile" = cond, "onExpansion" = onExpansion,
"numberOfProfiles" = profiles, "pricePerRow" = height, "the playground percent" = thePlaygroundPercent,
"emphasize first digit" = emphasizeFirstDigit, "volumeProfileShowStyle" = volumeShowStyle, "volumePercentVA" = theVolumePercent,
 "show initial balance" = showInitialBalance, "initial balance range" = initialBalanceRange);
def con = compoundValue(1, onExpansion, no);
def mbar = compoundvalue(1, if IsNaN(monkey.getPointOfControl()) and con then getValue(mbar, 1) else monkey.getPointOfControl(), monkey.getPointOfControl());
def hPG = compoundvalue(1, if IsNaN(monkey.getHighestValueArea()) and con then getValue(hPG, 1) else monkey.getHighestValueArea(), monkey.getHighestValueArea());
def lPG = compoundvalue(1, if IsNaN(monkey.getLowestValueArea()) and con then getValue(lPG, 1) else monkey.getLowestValueArea(), monkey.getLowestValueArea());

def hProfile = compoundvalue(1, if IsNaN(monkey.getHighest()) and con then getValue(hProfile, 1) else monkey.getHighest(), monkey.getHighest());
def lProfile = compoundvalue(1, if IsNaN(monkey.getLowest()) and con then getValue(lProfile, 1) else monkey.getLowest(), monkey.getLowest());
def plotsDomain = IsNaN(close) == onExpansion;

plot MB = if plotsDomain then mbar else Double.NaN;
plot ProfileHigh = if plotsDomain then hProfile else Double.NaN;
plot ProfileLow = if plotsDomain then lProfile else Double.NaN;
plot PGHigh = if plotsDomain then hPG else Double.NaN;
plot PGLow = if plotsDomain then lPG else Double.NaN;

DefineGlobalColor("Monkey Bar", GetColor(4));
DefineGlobalColor("The Playground", GetColor(3));
DefineGlobalColor("Open Price", GetColor(1));
DefineGlobalColor("Close Price", GetColor(1));
DefineGlobalColor("Volume", GetColor(8));
DefineGlobalColor("Volume Value Area", GetColor(2));
DefineGlobalColor("Volume Point of Control", GetColor(3));
DefineGlobalColor("Initial Balance", GetColor(7));

monkey.show(color.red, if showMonkeyBar then globalColor("Monkey Bar") else color.current,
 if showThePlayground then globalColor("The Playground") else color.current,
 opacity, if markOpenPrice then globalColor("Open Price") else color.current,
 if markClosePrice then globalColor("Close Price") else color.current,
 if showInitialBalance then globalColor("Initial Balance") else color.current,
 globalColor("Volume"),
 if showVolumeVA then globalColor("Volume Value Area") else color.current,
 if showVolumePOC then globalColor("Volume Point of Control") else color.current);
MB.SetDefaultColor(globalColor("Monkey Bar"));
MB.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PGHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PGLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
PGHigh.SetDefaultColor(globalColor("The Playground"));
PGLow.SetDefaultColor(globalColor("The Playground"));
ProfileHigh.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ProfileLow.SetPaintingStrategy(PaintingStrategy.HORIZONTAL);
ProfileHigh.SetDefaultColor(GetColor(3));
ProfileLow.SetDefaultColor(GetColor(3));
ProfileHigh.hide();
ProfileLow.hide();
You can change "Show Volume Style" in the input panel to "ALL" from "NONE" if you want the volume profile shown with the TPO.
Also, the aggregation period looks better on 5 minute rather than 1hr.

Psychology > Strategy ≥ Money

Last edited by Massive l; August 6th, 2013 at 10:14 PM.
Reply With Quote
The following 2 users say Thank You to Massive l for this post:
 
  #3 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received


15min charts - weekly profile 5 min aggregation
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).

1hr chart - weekly profile 5 min aggregation with volume profile added
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Psychology > Strategy ≥ Money
Reply With Quote
The following 3 users say Thank You to Massive l for this post:
 
  #4 (permalink)
Trading Apprentice
Buenos Aires, Argentina
 
Futures Experience: Intermediate
Platform: NinjaTrader, TOS
Favorite Futures: ES
 
Posts: 47 since Jun 2013
Thanks: 39 given, 4 received

Thats exactly what I was looking for. Thanks a lot for your help! I don't know why I was not able to find it!

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Buenos Aires, Argentina
 
Futures Experience: Intermediate
Platform: NinjaTrader, TOS
Favorite Futures: ES
 
Posts: 47 since Jun 2013
Thanks: 39 given, 4 received

by the way, you developed that code or it is publicly available somewhere I am missing? Thanks again for your help

Reply With Quote
 
  #6 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

It's part of the monkey bar code tos already has. I just changed the parameters inside the code so you didn't have to change much.
By the way, the va high and va low (playground) is at the 2nd standard deviation which is a preference of mine. The 1st one doesn't mean
much to me but it's the default on almost every profile you'll see. You can change it back by changing the setting to 70 from 95.

Psychology > Strategy ≥ Money
Reply With Quote
The following 2 users say Thank You to Massive l for this post:
 
  #7 (permalink)
Trading Apprentice
Buenos Aires, Argentina
 
Futures Experience: Intermediate
Platform: NinjaTrader, TOS
Favorite Futures: ES
 
Posts: 47 since Jun 2013
Thanks: 39 given, 4 received

Thanks again. I saw the difference in the standard deviation, I will leave it at 95 and make some tests, maybe it helps my trading.

I never used the profile in anything besides intraday so I am not sure if the logic still works with different timeframes. I imagine it would be more difficult to understand who is who on a weekly or monthly chart.

Reply With Quote
 
  #8 (permalink)
Elite Member
Portland, OR
 
Futures Experience: None
Platform: tos
Favorite Futures: NQ, SB, 6J, CL, GC
 
Massive l's Avatar
 
Posts: 1,458 since Mar 2011
Thanks: 922 given, 1,822 received

I predominately use a 6hr chart with 1 and 3 month profiles and hold anywhere
from 2 days to 2 months.

Psychology > Strategy ≥ Money
Reply With Quote
The following 3 users say Thank You to Massive l for this post:

Reply



futures io > > > > Is it possible to group the MonkeyBars chart to display a week?

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
Display indicator based on another chart DarkPoolTrading NinjaTrader 11 March 29th, 2013 11:05 AM
Display Indicator Value on Chart PeteRMDrake NinjaTrader 2 January 3rd, 2013 08:39 PM
Trouble getting study to display on chart JamieTX Sierra Chart 1 November 10th, 2012 05:56 AM
Is There A Way To Display The Chart Template? mkaminski NinjaTrader 4 April 5th, 2012 04:06 PM
Display on Chart wh The Elite Circle 10 October 22nd, 2009 06:09 PM


All times are GMT -4. The time now is 11:32 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-17 in 0.13 seconds with 19 queries on phoenix via your IP 54.90.92.204