NexusFi: Find Your Edge


Home Menu

 





Alert arrows


Discussion in ThinkOrSwim

Updated
    1. trending_up 4,677 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Alert arrows

  #1 (permalink)
snagas
Kaunas, Lithuania
 
Posts: 4 since Jun 2014
Thanks Given: 1
Thanks Received: 0

can you help me guys to code. I need 2 arrows when candles crosses BB and CCI bigger/lower then -+150. First one arrow like alert, second arrow when the trend changes just saying make your call/put.
I want to have alert sound on both arrows.

I use TOS - BB (CLOSE, 0, 20, -3.0, 3.0, SIMPLE)
CCI (5, 150, -150)

Thanks a lot for you help!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
REcommedations for programming help
Sierra Chart
Cheap historycal L1 data for stocks
Stocks and ETFs
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
 
  #2 (permalink)
snagas
Kaunas, Lithuania
 
Posts: 4 since Jun 2014
Thanks Given: 1
Thanks Received: 0

I'm just a begginer guys, so sorry if i wrote something wrong.
I decided to add EMA exponential and to get arrows when it crosses BB upper or lower bands. But it doesn't work. I don't see any arrows. Can you help me where I made a mistake?

#####EMA###
input price = close;
input EMA_Length = 3;
input aaverageType = AverageType.EXPONENTIAL;
def EMA = ExpAverage(price, EMA_Length);
plot EEMA= price;
EEMA.SetDefaultColor(GetColor(1));

####BB####

input displace = 0;
input length = 20;
input Num_Dev_Dn = -2.0;
input Num_Dev_up = 2.0;
input averageType = AverageType.SIMPLE;

def sDev = StDev(data = price[-displace], length = length);

plot MidLine = MovingAverage(averageType, data = price[-displace], length = length);
plot LowerBand = MidLine + Num_Dev_Dn * sDev;
plot UpperBand = MidLine + Num_Dev_up * sDev;

LowerBand.SetDefaultColor(GetColor(0));
MidLine.SetDefaultColor(GetColor(1));
UpperBand.SetDefaultColor(GetColor(5));

######ARROWS######

plot crossing = LowerBand < EEMA and LowerBand >= EEMA;
crossing.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot ccrossing = UpperBand > EEMA and UpperBand <= EEMA;
ccrossing.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Thank you!

Reply With Quote
  #3 (permalink)
 
rmejia's Avatar
 rmejia 
Puerto Rico
 
Experience: Intermediate
Platform: thinkorswim
Broker: TD Ameritrade
Trading: Options
Posts: 379 since Oct 2010
Thanks Given: 3,614
Thanks Received: 441


Have to tell it is when it crosses instead of > or <

I think there are several ways to write "crosses" in thinkscript, this is one:

plot crossing = crosses(LowerBand,EEMA) and LowerBand >= EEMA;
crossing.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
plot ccrossing = crosses(UpperBand,EEMA) and UpperBand <= EEMA;
ccrossing.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Reply With Quote
Thanked by:
  #4 (permalink)
snagas
Kaunas, Lithuania
 
Posts: 4 since Jun 2014
Thanks Given: 1
Thanks Received: 0

rmejia, thank's a lot!!! I appreciate that!
I will try to put your part and we will see how it's working on the chart.

Reply With Quote
  #5 (permalink)
snagas
Kaunas, Lithuania
 
Posts: 4 since Jun 2014
Thanks Given: 1
Thanks Received: 0

it's working perfect, exactly as I was planning.

The only problem is that I can't use it as I was expecting. Can't trust these signals. Some of them are not good for trade.
I need to find another solution. To be more accurate.

Reply With Quote




Last Updated on September 16, 2014


© 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