NexusFi: Find Your Edge


Home Menu

 





Candlestick Size Indicator Improved


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one cycomyco with 3 posts (0 thanks)
    2. looks_two RedK with 2 posts (2 thanks)
    3. looks_3 Billiebanks with 1 posts (0 thanks)
    4. looks_4 jhilou with 1 posts (0 thanks)
    1. trending_up 12,989 views
    2. thumb_up 2 thanks given
    3. group 4 followers
    1. forum 6 posts
    2. attach_file 2 attachments




 
Search this Thread

Candlestick Size Indicator Improved

  #1 (permalink)
cycomyco
riverdale georgia
 
Posts: 5 since Aug 2012
Thanks Given: 0
Thanks Received: 0

Does anybody know how how to create a study for TOS that when a candlestick reaches or passes a specified size a mark is placed on the chart along with the price, I need it to work on 1m charts.

Let me know if there is a TOS import for this already or if some one can write the code down for me thank you.

Example:

98.7
[]


95.3
[]


Forget about the number for one second I would like for singal to trigger when the legnth of the cadle reaches a specified size no mater if its going up or down.

If the [] candle green up length is 10 or above it will paint a up arrow above the candle on the chart.

If the [] candle red down and its length is 10 or above it will paint a down arrow above the candle on the chart.

The numbers on top of these candles is just the buy price but it would be nice to have this.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Trade idea based off three indicators.
Traders Hideout
Increase in trading performance by 75%
The Elite Circle
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
33 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
HumbleTraders next chapter
11 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #2 (permalink)
 
RedK's Avatar
 RedK 
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks Given: 44
Thanks Received: 145

Hi,

in case you didn't get a response on your request yet, here's the code you're looking for. Copy and paste to a new study in ToS and give it a name.. should do the trick. i can send you the .ts file if that's easier for you,

hope this helps,
RedK
-----------------------------------------------

input Alert_Range = 1.00;
Def Candle_size = High - low;
Def UpCandle = Close > Open;
Def DownCandle = Open > Close;
plot Signal_Up = Alert_Range > 0 and UpCandle and Candle_Size >= Alert_range;
plot Signal_Down = Alert_Range > 0 and DownCandle and Candle_Size >= Alert_Range;
Signal_Up.setPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);
Signal_Up.setDefaultColor(color.cyan);
Signal_Up.setlineWeight(2);
Signal_Down.setPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
Signal_Down.setdefaultColor(color.Orange);
Signal_Down.setlineWeight(2);
AddChartBubble(Signal_Up or Signal_Down, If signal_up then high else low, if signal_up then "" + high else "" + low, Color.yellow, signal_up );

Attached Thumbnails
Click image for larger version

Name:	Alert_Range.png
Views:	1301
Size:	23.8 KB
ID:	86856  
Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
cycomyco
riverdale georgia
 
Posts: 5 since Aug 2012
Thanks Given: 0
Thanks Received: 0


Thank you for the help in my study this exactly what I need. If possible can you make a few changes.

1. I need to add a sound alert

alert(open>1.2,”High UP!”,alert.BAR,sound.DING);

2. The problem I am having is if I’m on EUR/USD and I set the alert to .00012 when I switch to EUR/JPY it triggers way to many times so I have to go in and change the alert #.00012 to .00015 Do I have to make setting for each forex or is there a way around this.

3. I am using 1min charts so all I really need is for the alert to trigger in 4 pips that way I can use it for all forex.
so if there is a way to rearrange the code to work off of pips that would be perfect.

Reply With Quote
  #4 (permalink)
 
RedK's Avatar
 RedK 
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks Given: 44
Thanks Received: 145

Hi Cycomyco,

1 - added the alert and an Open_Alert input setting ..

2 - 2 ways i see to go around what you need here
first, either you have a set of preferred pairs, each with a different "Alert_bar" setting you use, then we can build a conditional choice around that in the script .. for example (in simple language):
if we're in EUR/USD --> use Alert_Bar value of x
but if we're in EUR/JPY --> use Alert_Bar value of y
... and so on ...
otherwise use Alert_Bar generic value of z

second approach, if there's some sort of a formula that we can use, to calc the proper Alert_Bar value (or come close to it then override as/if needed) based on some variables of the price on the "current chart" regardless of which pair.

for example, in my PriceLevels indicator (EliteSection) i use a generic initial range of 0.5% of the midpoint value of the chart. and there's a setting to over-ride this from the study setting. this way i only need to enter a manual value if the default 0.5% (which should cover many scenarios) doesn't work or i need to see other levels increment.

your choice, we can do either ways.
but i'm not a FOREX expert.. so i can't suggest an approach.. i don't even know what a pip is .. (yes i heard the term.. an interesting word).. but do you mean there's a common Alert_Bar length/range that you need to trigger that alert/signal? then we should use that and if it's up or down, we show the arrows & price accordingly.

in the range charts in TOS, and you can set the range to any value you may need. it seems to work with FOREX .. don't know. it's a different view that i'm mentally not used to .. and my brains get confused so i stick to classic time charts and don't play with it that much.. you may try to give it a shot.

let me know if you need more help,
Cheers, RedK

Alert_Bar_v1.txt

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
cycomyco
riverdale georgia
 
Posts: 5 since Aug 2012
Thanks Given: 0
Thanks Received: 0

Thank you again for taking the time to help me with this study I think you have solved this study the only thing I would say is I trade forex as well and I'll take your recommendation on how to approach this study.

A pip is simple the lowest amount a forex, stock, indices can move in so if you had 1.9656 the pip would be the 6 its always the lowest number in the price.

I will be posting a new challenge study today please check it out I think its going to be huge if it can be done especially for forex trading.

Reply With Quote
  #6 (permalink)
jhilou
houston, TX
 
Posts: 1 since Jun 2020
Thanks Given: 0
Thanks Received: 0

Hi REDK,
On the Alert_Bar_v1.txt the chartbubble covers up everything!
Is there a way to show the bubble on the bottom of the screen, showing only the last candle and the current candle, showing open price and close price, pluas a bubble showing the difference in price.
Your help is highly appreciated
Thanks
Joe



RedK View Post
Hi Cycomyco,

1 - added the alert and an Open_Alert input setting ..

2 - 2 ways i see to go around what you need here
first, either you have a set of preferred pairs, each with a different "Alert_bar" setting you use, then we can build a conditional choice around that in the script .. for example (in simple language):
if we're in EUR/USD --> use Alert_Bar value of x
but if we're in EUR/JPY --> use Alert_Bar value of y
... and so on ...
otherwise use Alert_Bar generic value of z

second approach, if there's some sort of a formula that we can use, to calc the proper Alert_Bar value (or come close to it then override as/if needed) based on some variables of the price on the "current chart" regardless of which pair.

for example, in my PriceLevels indicator (EliteSection) i use a generic initial range of 0.5% of the midpoint value of the chart. and there's a setting to over-ride this from the study setting. this way i only need to enter a manual value if the default 0.5% (which should cover many scenarios) doesn't work or i need to see other levels increment.

your choice, we can do either ways.
but i'm not a FOREX expert.. so i can't suggest an approach.. i don't even know what a pip is .. (yes i heard the term.. an interesting word).. but do you mean there's a common Alert_Bar length/range that you need to trigger that alert/signal? then we should use that and if it's up or down, we show the arrows & price accordingly.

in the range charts in TOS, and you can set the range to any value you may need. it seems to work with FOREX .. don't know. it's a different view that i'm mentally not used to .. and my brains get confused so i stick to classic time charts and don't play with it that much.. you may try to give it a shot.

let me know if you need more help,
Cheers, RedK

Attachment 86887


Reply With Quote
  #7 (permalink)
Billiebanks
Miami florida
 
Posts: 1 since Jul 2020
Thanks Given: 1
Thanks Received: 0


RedK View Post
Hi,

in case you didn't get a response on your request yet, here's the code you're looking for. Copy and paste to a new study in ToS and give it a name.. should do the trick. i can send you the .ts file if that's easier for you,

hope this helps,
RedK
-----------------------------------------------

input Alert_Range = 1.00;
Def Candle_size = High - low;
Def UpCandle = Close > Open;
Def DownCandle = Open > Close;
plot Signal_Up = Alert_Range > 0 and UpCandle and Candle_Size >= Alert_range;
plot Signal_Down = Alert_Range > 0 and DownCandle and Candle_Size >= Alert_Range;
Signal_Up.setPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_up);
Signal_Up.setDefaultColor(color.cyan);
Signal_Up.setlineWeight(2);
Signal_Down.setPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_Down);
Signal_Down.setdefaultColor(color.Orange);
Signal_Down.setlineWeight(2);
AddChartBubble(Signal_Up or Signal_Down, If signal_up then high else low, if signal_up then "" + high else "" + low, Color.yellow, signal_up );


Hey can you add this code to a pattern scan? I want to specifically make sure the candle that starts a pattern is a big increase in volume

Reply With Quote




Last Updated on July 26, 2020


© 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