Forgotten Your Password?
Connect with Facebook
Frequent Questions

Coding Forum Collaborate, receive help, or discuss coding related issues.

Coding Forum Thread, Candlestick Coding in Trading Resources; I have fairly simple question (at least i think it is for anyone who codes). I'd like the following indicator ...
Reply
 
LinkBack Thread Tools Display Modes

Candlestick Coding  

  #1  
Old 12-03-2009, 04:22 AM
lonew0lf
update
 
Join Date: Oct 2009
Location: london
Posts: 47
Thanks: 1
Thanked 5 Times in 4 Posts
I have fairly simple question (at least i think it is for anyone who codes). I'd like the following indicator to plot the text of the type of candlestick rather than dots.

Below is from MC and this indicates doji. Looking to have the text display above/below the bar, thanks.

inputs: Percent( 5 ) ;

if C_Doji( Percent ) = 1 then
begin
Plot1( Close, "Doji" ) ;
Alert( "Doji" ) ;
end ;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #2  
Old 12-03-2009, 06:05 AM
jrcentaur59
 
Join Date: Oct 2009
Location: Allentown
Posts: 5
Thanks: 4
Thanked 0 Times in 0 Posts
Huh?????????????????????? ??????????????????
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #3  
Old 12-03-2009, 10:49 AM
sep34's Avatar
sep34
 
Join Date: Dec 2008
Location: USA
Posts: 109
Thanks: 17
Thanked 55 Times in 33 Posts
Originally Posted by lonew0lf View Post
I have fairly simple question (at least i think it is for anyone who codes). I'd like the following indicator to plot the text of the type of candlestick rather than dots.

Below is from MC and this indicates doji. Looking to have the text display above/below the bar, thanks.

inputs: Percent( 5 ) ;

if C_Doji( Percent ) = 1 then
begin
Plot1( Close, "Doji" ) ;
Alert( "Doji" ) ;
end ;


This is how its done in TS, it should work in MC too.



//-------------------------------------------------------------------------------------------------------------------
Input: My_TEXT ("Doji");
Input: Txt_below_bar (2);
Input: Long_Clr (magenta);
Input: Horizdown (3);
Input: Vertdown (2);
inputs: Percent( 5 ) ;

variables:Text_ID2(0),one tick(0);

onetick = minmove/pricescale;


if C_Doji( Percent ) = 1 then
begin


Text_ID2 = Text_New( Date, Time, low-Txt_below_bar*onetick, My_TEXT );
text_setcolor( Text_ID2,long_clr) ;
Text_SetStyle(Text_ID2, horizdown, vertdown);
end;
//--------------------------------------------------------------------------------------------------------------------
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #4  
Old 12-04-2009, 01:51 AM
lonew0lf
update
 
Join Date: Oct 2009
Location: london
Posts: 47
Thanks: 1
Thanked 5 Times in 4 Posts
Sep34,

thanks for the reply. This looks to be what i'm trying to accomplish; however, when I compile I get the below error, any thoughts?

"assignment is allowed only for variables or array elements"

Input: My_TEXT ("Doji");
Input: Txt_below_bar (2);
Input: Long_Clr (magenta);
Input: Horizdown (3);
Input: Vertdown (2);

inputs: Percent( 5 ) ;

onetick = minmove/pricescale;

if C_Doji( Percent ) = 1 then begin

Text_ID2 = Text_New( Date, Time, low-Txt_below_bar*onetick, My_TEXT );
text_setcolor( Text_ID2,long_clr) ;
Text_SetStyle(Text_ID2, horizdown, vertdown);
end;
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #5  
Old 12-04-2009, 01:57 AM
sevensa
 
Join Date: Nov 2006
Location: N/A
Posts: 611
Thanks: 62
Thanked 272 Times in 169 Posts
Originally Posted by lonew0lf View Post
Sep34,

thanks for the reply. This looks to be what i'm trying to accomplish; however, when I compile I get the below error, any thoughts?

"assignment is allowed only for variables or array elements"
In the post from sep34, replace this line:

Code:
variables:Text_ID2(0),one tick(0);
with this one:

Code:
variables:Text_ID2(0),onetick(0);
When copy and pasting code, it should be encapsulated with code tags (the # sign in the menu do that), otherwise formatting gets lost.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #6  
Old 12-04-2009, 02:01 AM
sevensa
 
Join Date: Nov 2006
Location: N/A
Posts: 611
Thanks: 62
Thanked 272 Times in 169 Posts
Originally Posted by jrcentaur59 View Post
Huh?????????????????????? ??????????????????
Did you get confused and thought you were on ET?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #7  
Old 12-04-2009, 02:34 AM
lonew0lf
update
 
Join Date: Oct 2009
Location: london
Posts: 47
Thanks: 1
Thanked 5 Times in 4 Posts
Sep34 & Sevensa:

Many thanks, it now works the way I had hoped.

In applying these variables (and learning easy language/power language), is it possible to use the same inputs for other candlestick patters, for example bullish/bearish engulfing, etc... or are the parameters for the doji unique?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #8  
Old 12-04-2009, 07:10 AM
BlowFish's Avatar
BlowFish
.BlowFish
 
Join Date: Mar 2007
Location: In Da House
Posts: 2,840
Thanks: 108
Thanked 822 Times in 562 Posts
TradeStation EasyLanguage Code these functions might help. I am sure you can find more on the interwebz.

Candlestick detection is an ideal starter project to learn some easy language as it simply compares O,H,L & C's. Whether it is useful to trade with these patterns rather than reading the sentiment behind them depends on your objectives I guess.

Edit: Its up to you what are suitable parameters for the indicators. I might require that a hanging man has 3 times the wick to the body tou might want 2.5. Easy language will simply detect what you tell it to.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #9  
Old 12-04-2009, 01:39 PM
sep34's Avatar
sep34
 
Join Date: Dec 2008
Location: USA
Posts: 109
Thanks: 17
Thanked 55 Times in 33 Posts
Originally Posted by lonew0lf View Post
Sep34 & Sevensa:

Many thanks, it now works the way I had hoped.

In applying these variables (and learning easy language/power language), is it possible to use the same inputs for other candlestick patters, for example bullish/bearish engulfing, etc... or are the parameters for the doji unique?
Lonewolf,

If I understand you correctly then yes,

you can use the same code above and below the code for the doji, in concert with another code that describes another candle pattern and just name them engulfing or what ever via an input. In the past I have coded apprx 30+ candle patterns and use the same text code and inputs (inputs/variables related to plotting the text)that I posted above.


By the way,...Im sure you are already aware of this, just in case, the definitions for candlesstick pattern in TS Indicator Library or most books e.g. Nison are very....hmm how to say this....lets just say that they are very humble and thats being kind, an introduction at most.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Re: Candlestick Coding  

  #10  
Old 12-04-2009, 01:56 PM
sep34's Avatar
sep34
 
Join Date: Dec 2008
Location: USA
Posts: 109
Thanks: 17
Thanked 55 Times in 33 Posts
Originally Posted by BlowFish View Post

Candlestick detection is an ideal starter project to learn some easy language as it simply compares O,H,L & C's.
Agree, infact thats how I learned what little EL I know, however I have several CandleStick patterns that fill up two pages of code, on the other hand, If I knew how to use loops at the time of coding it would have reduce the length of the could to somthing much smaller.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why Do Candlestick Patterns Work? TraderBG The Candlestick Corner 9 10-16-2008 06:53 PM
Why Candlestick Anaylsis is Different and Might Work for You brownsfan019 The Candlestick Corner 18 04-10-2008 12:58 PM
Intraday Candlestick Trading brownsfan019 The Candlestick Corner 53 12-19-2007 08:23 AM
Daily Candlestick Triggers MrPaul Technical Analysis 36 03-29-2007 11:50 AM


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


» »

» Invite Friends