Welcome Guest, please sign in to participate in a discussion. | Search | Active Topics | |
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
QUOTE (devtrader) In this chart I have two blue condition tablets. my plan is to create two conditions for each PP, S1, R1, R2 etc... and then drop in a single combo condition tablet with ORs and then drop that combo condition as a data column in the watchlist. since these process is tidious and many tablets will clutter the chart area is it possible to write a real code for this and will have one single tablet. the pseudocode for the combo tablet condition may be
if the price_history moves up PP OR pricehistory moves down PP
paint
else if the price_history moves up S1 OR pricehistory moves down S2
my goal is to catch any time candle Crossing/ almost crosing/Pretty close to PP S1 R1 or R2. If I get the real code for at least one PP I can mimic the other points.
If the goal is to paint the Chart, you might be better off with a Paint Scheme. I've eliminated everything else from the Chart and just focused on the Pivot Points so you could see the technique used and hopefully be able to reproduce it on your own.
You should be able to Open an attached Chart directly into a running copy of StockFinder 5 (and save it from within StockFinder if desired). You could also copy and paste the Chart into the \My Documents\StockFinder5\(Your Username)\My Charts\ folder and then load it like you would any other Chart (the Chart is SF5 only).Attachments: PivotPointScheme.sfChart - 71 KB, downloaded 832 time(s).
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/12/2009 Posts: 34
|
thkx it is great solution.I will use this paintschemet though in my chart. I might not have explained in my request correctly. sorry about that. however my goal is not to paint the candles. What I want is create a condition (eliptical tablet) which will have real code for whenever any candles crossing/almost crossing up the PP or S1 or S2 or R3 line etc... will pass( means when I drop the condition in the watchlist with specific color as a condition column). will show color for that specific stock once the criterea meets. Also similarly I will create another condition real code vice versa(crossing /almost crossing downwards) for all pivotpoints.
Right now I have created two conditions for each pivot points and bundled all upwards in a single combo condition and all downwards in a single combo condition. that makes the chart cluttered with so many condition tablets. the objective is to cut down to only two condition tablets. Let me know If I have confused you before you start writing real code.
Again I appreciate for what you do for us.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If you want to create a RealCode Condition instead of RealCode Paint Scheme, you wouldn't need to make many alterations. You would need to switch from Line.Value to Price.Last and change the PlotColor Lines to Pass Lines. So the following:
'# PP = chart.PP
'# R1 = chart.R1
'# S1 = chart.S1
If (Line.Value > PP.Value AndAlso _
Line.Value(1) <= PP.Value) OrElse _
(Line.Value < PP.Value AndAlso _
Line.Value(1) >= PP.Value) Then
PlotColor = Color.Yellow
Else If (Line.Value > S1.Value AndAlso _
Line.Value(1) <= S1.Value) OrElse _
(Line.Value < S1.Value AndAlso _
Line.Value(1) >= S1.Value) Then
PlotColor = Color.Red
Else If (Line.Value > R1.Value AndAlso _
Line.Value(1) <= R1.Value) OrElse _
(Line.Value < R1.Value AndAlso _
Line.Value(1) >= R1.Value) Then
PlotColor = Color.Lime
Else
PlotColor = Color.White
End If
Would become (and would be put in the Code tab of the RealCode Editor for a RealCode Indicator instead of being put in the RealCode Editor of a Paint Scheme):
'# PP = chart.PP
'# R1 = chart.R1
'# S1 = chart.S1
If (Price.Last > PP.Value AndAlso _
Price.Last(1) <= PP.Value) OrElse _
(Price.Last < PP.Value AndAlso _
Price.Last(1) >= PP.Value) Then
Pass
Else If (Price.Last > S1.Value AndAlso _
Price.Last(1) <= S1.Value) OrElse _
(Price.Last < S1.Value AndAlso _
Price.Last(1) >= S1.Value) Then
Pass
Else If (Price.Last > R1.Value AndAlso _
Price.Last(1) <= R1.Value) OrElse _
(Price.Last < R1.Value AndAlso _
Price.Last(1) >= R1.Value) Then
Pass
End If
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 9/1/2009 Posts: 7
|
Bruce, I have a related request to Pivot Points. I would like to draw lines on a price chart, e.g., SP-500, so that additional lines show on the chart for each pivot point (PP, R1, S1, R2, S2, R3, S3) just like I see on FreeStockCharts. However, I have not been able to figure out how to generate these lines in StockFinder 5.0.
Is that even possible?
Peter
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
pkuchnicki,
This topic is basically a follow-up to (and builds upon) the Pivot point as plotted in Freestockcharts.com topic containing the nearest thing I have seen in StockFiinder to the Pivot Points at FreeStockCharts.com.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 9/1/2009 Posts: 7
|
Thanks, Bruce. Worked like a champ from the start.
However, I'm not sure the calculations are correct. I really don't understand the code you wrote, however, taking the SP-500 from yesterday, 27Jul10.
High = 1120.95
Low = 1109.78
Close = 1113.84
total is 3344.57
PP value therefore is 1114.86 assuming (PP = (H + L + C) / 3)
The code provided gives a PP value of 1110.44 which does not match. Any ideas?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
pkuchnicki,
I do not know what might be happening on your computer, but the Pivot Point is clearly being Plotted for SP-500 at 1114.857 on my computer (complete with a Label to that effect). I'm running StockFinder Platinum 5.
Do you have data for 7/28/2010 on your Charts in StockFinder? The Gold data is currently End of Day only (although we hope for this to change at some point). You would need StockFinder Platinum to have 7/28/2010 data.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 9/1/2009 Posts: 7
|
Now that is seriously fascinating......and scary!
|
|
Registered User Joined: 9/1/2009 Posts: 7
|
I am running SF 5.0 Gold edition.
And I do not have any values for 28Jul10 on any of my charts.
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
pkuchnicki,
I apologize for any confusion. StockFinder Gold is currently End of Day only. You will not have any of today's data until after the Market Close.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 9/1/2009 Posts: 7
|
Never mind. I got it. The Pivot Points calculated using the last day's data I have loaded in Stockfinder (which is 27Jul10), are the Pivot Points for 28Jul10 which is today.
When I go back and use 26Jul10 numbers, it calculates exactly what shows up on my chart.
We're good.
Everything works beautifully.
Thanks,
Peter
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
pkuchnicki,
You're welcome. I'm happy to read it is working correctly for you.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 12/12/2009 Posts: 34
|
Bruce , thanks for your hard work. I really appreciate the solution.
devtrader
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
devtrader,
You're welcome.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |