Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 04-07-2010, 10:18 PM   #1

Join Date: Jan 2008
Location: Amarillo
Posts: 24
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Angry Show Me Help

Can anyone help?
I would like a showme study to plot above and below the bar that crosses a moving average. Only on the first close above or below on each occurance. For up the upperline and for down the lower line.

_________________________ ________

Inputs: Length(100), TrigAvg(20), UpColor(Green), DnColor(Magenta);


Variables: back(0), xAvg(0);


PLOT1 (TimeSeriesForecast (Length, 0), "Trigger") ;
xAvg = XAverage (PLOT1, TrigAvg) ;
PLOT2 (xAvg, "AverageTSF") ;
IF (PLOT2 >= PLOT1) THEN
BEGIN
SETPLOTCOLOR (1, DnColor) ;
SETPLOTCOLOR (2, DnColor) ;
END ELSE
BEGIN
SETPLOTCOLOR (1, UpColor) ;
SETPLOTCOLOR (2, UpColor) ;
END ;
9146894me is offline  
Reply With Quote
Old 04-09-2010, 06:48 AM   #2

zapisy's Avatar

Join Date: Jan 2009
Location: New York
Posts: 81
Ignore this user

Thanks: 6
Thanked 26 Times in 17 Posts

Re: Show Me Help

Use PaintBar instead of ShowMe

Example code:


Code:

Input: Length(100);  
Input: TrigAvg(20);
Input: UpColor(Green);
Input: DnColor(Magenta);	


Var: back(0);
Var: xAvg(0);
Var: xTime(0);


xAvg  = XAverage (xTime, TrigAvg) ;
xTime = TimeSeriesForecast (Length, 0);


If close crosses above xAvg then PlotPaintBar( High, Low, Open, Close, "Cross", UpColor , 0, 2 ) ;

If close crosses below xAvg then PlotPaintBar( High, Low, Open, Close, "Cross", DnColor , 0, 2 ) ;
zapisy is offline  
Reply With Quote
Old 04-09-2010, 12:23 PM   #3

Join Date: Jan 2008
Location: Amarillo
Posts: 24
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Show Me Help

Thanks for the Paintbar help. I plotted it and see it needs a little cleaning up. I added comments to 2 pictures and hopfully hte visual will help. I have lines crossing. I would like a paint bar to plot when there is a close Above the upper line which ever line that may be since they cross each other at times and NOT plot again until there is a close below the lower line and a paintbar plot.
Thanks
Attached Thumbnails
Show Me Help-cross-avg-plot.jpg   Show Me Help-avg-cross-plot-2.jpg  
9146894me is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Futures I Trade Show & Brooks Book brownsfan019 The Candlestick Corner 638 04-25-2012 11:00 AM
Help with Simple Show Me 9146894me Coding Forum 14 06-03-2010 09:36 AM
OEC Show Case Chouca Open E Cry 4 05-06-2010 09:15 PM
Converting a "Show Me" for Scanning daedalus Coding Forum 15 04-14-2010 10:03 PM
Show us your roots! Nick1984 General Discussion 13 06-18-2007 11:41 PM

All times are GMT -4. The time now is 02:35 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.