Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Profile: kcaughron31
About
User Name: kcaughron31
Groups: Gold User, Member, TeleChart
Rank: Registered User
Real Name:
Location
Occupation:
Interests:
Gender: Unsure
Statistics
Joined: Wednesday, March 4, 2009
Last Visit: Wednesday, July 6, 2011 10:55:40 AM
Number of Posts: 160
[0.05% of all post / 0.03 posts per day]
Avatar
Last 10 Posts
Topic: Liquid Optionable Stocks/ETFs with Tight Option Bid/Ask Spreads
Posted: Tuesday, July 5, 2011 9:57:37 PM
Hey Pthegreat,  I was wanting to know if you would like to look at a new system and give me your feedback on it.  the demo is located at www.sittsoftware.com  .  please take a look at it and let me know if that would be something intresting to you.  I hear that they are doing a complete redo of the site and it sould be up and running the new site release in a couple of weeks.  I can't wait.  This looks very promising in the way that they have done it and the way that it works.  If you could please email me at kcaughron31@ comcasst.net


Ken C.

Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 3:26:31 PM
Bruce what code line do I need to add to have the price at the end of the line like the pivot point chart?
Could I just add the line that plots out the 0.00?
Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 3:09:58 PM
I found the error and it's working great, thanks
Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 2:59:19 PM
Bruce I think I see what might be wrong:

 Sub New
        AutoLoop = False
        '# ZZP = chart.ZigZagPercent
        '# SupAgo = UserInput.Integer = 1
    End Sub
    Public Overrides Function Plot() As System.Single
        If ZZP.Line.Count >= 3 Then

I think that the code shoule look like this at the start

 Sub New
        AutoLoop = False
 End Sub
'# ZZP = chart.ZigZagPercent
        '# SupAgo = UserInput.Integer = 1
 Public Overrides Function Plot() As System.Single
        If ZZP.Line.Count >= 3 Then
(then the rest of the code)

Does this look right to you?

Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 2:52:24 PM

Bruce I get these errors when adding the code:
ZZP not declaired. Lines 14, 15,18, 24, 25

Here is the code copied after I pasted what you gave me.


1.<WBIGuid("39876aeb-f1c5-4bd4-8ab6-8c6abe1e49c4"),FriendlyName("RealCodeIndicator"),BlockTemplateEmptyMethodOnly()>

_
2.Public partial Class RealCodeIndicator
3. Inherits RealCodeIndicator_base
4. Sub New
5.  AutoLoop = False
6.  '# ZZP = chart.ZigZagPercent
7.  '# SupAgo = UserInput.Integer = 1
8. End Sub
9. Public Overrides Function Plot() As System.Single
10.  If ZZP.Line.Count >= 3 Then
11.   Dim Count As Integer = 0
12.   Dim Support As Single = Single.NaN
13.   Dim i As Integer
14.   For i = ZZP.Line.Count - 2 To 1 Step -1
15.    If ZZP.Line.Value(i) < ZZP.Line.Value(i - 1) Then
16.     Count += 1
17.     If Count = SupAgo Then
18.      Support = ZZP.Line.Value(i)
19.      Exit For
20.     End If
21.    End If
22.   Next
23.   If Not Single.IsNaN(Support) Then
24.    AddToOutput(ZZP.Line.DateValue(i), Support)
25.    AddToOutput(ZZP.Line.DateValue(ZZP.Line.Count - 1), Support)
26.   End If
27.  End If
28. End Function
29.End Class

Any idea what I did wrong?

Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 1:02:51 PM

Well could someone tell me if we could use ZZTop, ZZTop(1), and ZZTop(2) and the same for the bottom and then just plot out the horizontal line with the price on that line?  Would SF RC be able to understand the defining points that we would want in this or is that something that Kuff would have to look at to see if it is even possible in the API.  Also is there a downloadable copy of the RC API somewhere so as to be able to print out the api into a booklet for referance?

Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 12:28:55 PM
Bruce is there a way to have the plots do something like the last pivot point chart codes that we went over last week to where like the last 3 highs and last 3 lows would just plot a horizontal line with the price at the end of the chart?  If there is a way to use the ZZtop and bottom conditions for pointers to start from and use the last three of each and plot horizontaly with price at the end this would be about the best that I could hope for.
Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 11:19:45 AM
Bruce I was looking at the ZZ top condition code and came up with this one.  Check this and see if I've come close to getting it right or if it might work.


'|******************************************************************
'|*** StockFinder RealCode Indicator - Version 5.0 www.worden.com
'|*** Copy and paste this header and code into StockFinder *********
'|*** Indicator:Support
'|******************************************************************
Static Support As Single
If isFirstBar Then
    Support = Single.NaN
End If
 If Price.low < Price.low(1) AndAlso _
 Price.low < price.low(-1) Then
 Support = Price.low
End If
Plot = Support

Thanks
Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 10:27:02 AM
Bruce the way that this plots out is there some way that it could be linked to use the Zig Zag tops andd bottoms and do the same.  I don't mean the ZZ pivot point chart but to use the ZZ tops and bottoms and have like the last 3 tops and last 3 bottoms to show up.  Wouldn't this look a whole lot like the links picture?

Just wondering when I got it ploted out and then looked a little closer to the links pic and that just sortof hit me as that might work.  I don't know anything on how the ZZ indicator is calculated or how to figure out the tops and bottoms, could you help please
Topic: A different support and resistance indicator recode
Posted: Tuesday, March 15, 2011 7:06:30 AM

Bruce, Can you convert this code to where it will work in SF?  Here is a screen shot link and the Metatrader code below:

http://www.earnforex.com/metatrader-indicators/Support-and-Resistance

The code:

//+------------------------------------------------------------------+
//|                                           Support and Resistance |
//|                                      Copyright &copy; 2010, EarnForex |
//|                                        http://www.earnforex.com/ |
//|                          Based on MT4 indicator by Barry Stander |
//+------------------------------------------------------------------+
#property copyright "Copyright &copy; 2010, EarnForex"
#property link      "http://www.earnforex.com"
#property version   "1.01"
#property description "Blue and red support and resistance levels displayed directly on the chart."
#property description "Based on MT4 indicator by Barry Stander."

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots   2
#property indicator_color1  Red
#property indicator_type1   DRAW_ARROW
#property indicator_style1  STYLE_SOLID
#property indicator_width1  2
#property indicator_color2  Blue
#property indicator_type2   DRAW_ARROW
#property indicator_style2  STYLE_SOLID
#property indicator_width2  2

//---- buffers
double Resistance[];
double Support[];

void OnInit()
{
   IndicatorSetString(INDICATOR_SHORTNAME, "Support and Resistance");
   IndicatorSetInteger(INDICATOR_DIGITS, _Digits);

   PlotIndexSetInteger(0, PLOT_ARROW, 119);
   PlotIndexSetInteger(1, PLOT_ARROW, 119);

   SetIndexBuffer(0, Resistance);
   PlotIndexSetString(0, PLOT_LABEL, "Resistance");

   SetIndexBuffer(1, Support);
   PlotIndexSetString(1, PLOT_LABEL, "Support");

   ArraySetAsSeries(Resistance, true);
   ArraySetAsSeries(Support, true);
}

//+------------------------------------------------------------------+
//| Custom Support and Resistance                                    |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &High[],
                const double &Low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
   ArraySetAsSeries(High, true);
   ArraySetAsSeries(Low, true);

   //Get the values of the Fractals indicator before entering the cycle
   double FractalUpperBuffer[];
   double FractalLowerBuffer[];
   int myFractal = iFractals(NULL, 0);
   CopyBuffer(myFractal, 0, 0, rates_total, FractalUpperBuffer);
   CopyBuffer(myFractal, 1, 0, rates_total, FractalLowerBuffer);
 ArraySetAsSeries(FractalUpperBuffer, true);
 ArraySetAsSeries(FractalLowerBuffer, true);
 
   for (int i = rates_total - 2; i >= 0; i--)
   {
  if (FractalUpperBuffer[i] != EMPTY_VALUE) Resistance[i] = High[i];
     else Resistance[i] = Resistance[i + 1];
 
   if (FractalLowerBuffer[i] != EMPTY_VALUE) Support[i] = Low[i];
      else Support[i] = Support[i + 1];
   }  

 return(rates_total);
}

//+------------------------------------------------------------------+