View Full Version : Scalper
Gumphrie
08-14-2007, 08:13 AM
Requested by pdawg. This is an indicator that looks for higher highs and lower lows.
Inspired by John Carter's TTMScalper. There is a video at http://www.tradethemarkets.com/products/item7.cfm
I haven't tested this much, so any feedback would be appreciated.
http://www.acuclick.net/scalper.jpg
Note it will work on OHLC and HiLowBars also, but you may want to change the default Scalper bar colour in properties from Lavender in order to actually see the bars.
To import:
- Download the file contained in this thread to your desktop
- From the Control Center window select the menu File > Utilities > Import NinjaScript
- Select the downloaded file
ChangeLog
v0.2 : Updated so paints one bar ahead and removed the period parameter as was pointless on alternative non-default values.
v0.3 : Fixed possible plotting error.
v0.5 : Updated 31st August. Fixed cpu usage problem & added alert arrows to highlight the current trigger bars
v0.6 : Updated 3rd March 2010. Added option for alert sounds on new scalper bars and new/lost trigger arrows
(v0.4 was the experimental version where the changes haven't made it into the final code)
pdawg
08-14-2007, 09:47 AM
Thanks a bunch Gumphrie. I am loading this up as we speak and will let you know how it does.
ceesvh
08-14-2007, 12:03 PM
Gumphrie
Is the link correct? I could not find the page.
pdawg
08-14-2007, 12:09 PM
Gumphrie,
Seems like the right bar is being painted, but I'm not sure it is being painted when it's supposed to. After a 3rd higher close, if you get a lower close the low of the lower close bar is the trigger. A close below the low of the trigger bar should paint the high bar. It seems to be doing it later.
Gumphrie
08-14-2007, 12:17 PM
Gumphrie
Is the link correct? I could not find the page.
Strange a "%29" gets added to the URL, not sure why. Take it off and its fine.
Gumphrie
08-14-2007, 12:53 PM
Seems like the right bar is being painted, but I'm not sure it is being painted when it's supposed to. After a 3rd higher close, if you get a lower close the low of the lower close bar is the trigger. A close below the low of the trigger bar should paint the high bar. It seems to be doing it later.
I think it only paints the bar after the period has passed. Does that answer the question? I'm not sure.
pdawg
08-14-2007, 01:29 PM
Not sure unless maybe I am misunderstanding the method. But after watching the video, and then watching the bars, seems like when the trigger bar has been violated by a close below it, it should then paint the high bar upon close of that lower confirming bar. As I watch it seem to do it later than that?
Gumphrie
08-14-2007, 02:28 PM
Not sure unless maybe I am misunderstanding the method. But after watching the video, and then watching the bars, seems like when the trigger bar has been violated by a close below it, it should then paint the high bar upon close of that lower confirming bar. As I watch it seem to do it later than that?
This is really hard for me to test. Does changing the "else if" in the middle of OnBarUpdate to a plain "if" fix it? When it seems to painting too late, how much later is it?
pdawg
08-14-2007, 02:53 PM
seems like a couple bars late, and when it does change color the bar that triggers the color change doesn't really violate anything, so it seems to be off a bit. I will try changing the else if, that might be throwing it off.
pdawg
08-14-2007, 04:34 PM
OK, I think I see whats happening. After watching it this morning i did some replays, and it paints the bar after an opposite swing pivot is in place. So thats why it was getting painted late. I'm a C# noob, so not sure where the logic is messed up, but changing the else if to if, didn't change anything as far as I can tell.
Gumphrie
08-14-2007, 06:08 PM
Ok, after staring at it for a while I can see that it can do the painting one bar ahead of time. I'm not sure if that fixes the problem or not, so if you can confirm pdawg, that would be great. I've updated the attachment in the first post.
I've also managed to fix that link in the first post.
pdawg
08-14-2007, 09:07 PM
Gumphrie,
Yes that prints 1 bar sooner, however it appears that it should still print one bar sooner than that. When the trigger bar low is broken by a close of a latter bar, instead of printing on that bar's close it is taking it an extra bar to print. If you can fix that, I think it will be good to go.
Thanks.
Gumphrie
08-14-2007, 09:38 PM
Yes that prints 1 bar sooner, however it appears that it should still print one bar sooner than that.
Ok, try it now. Thanks for testing this, I don't use replays, so can't see whats happening fast enough.
pdawg
08-14-2007, 09:52 PM
Gumphrie,
Thanks I will test in a bit. Here is an interesting paint setup from Carter's video today:
http://www.tradethemarkets.com/public/1074.cfm
go to the 3:20 mark in the video, and notice how it paints that bar. Looks like that bar violated the low of the previous trigger bar, but since it made a higher high, it got painted.
pdawg
08-14-2007, 11:42 PM
Gumphrie,
I think you just about got it. Bars are painting at the appropriate bar close. I just came across this paint setup (see attached screenshot). The first scalper painted correctly, however I'm doubting the second one should have. I don't think it falls under the 3 lower closes rule, however did paint correctly as if it did, on the close of the following 3rd blue bar. So maybe it's looking at the extreme bar a little differently than the TTM trend is setup to do?
Anyhow, I'll keep testing it and keep you posted.
Thanks for your hard work.
P
Gumphrie
08-15-2007, 05:45 AM
I don't think it falls under the 3 lower closes rule, however did paint correctly as if it did, on the close of the following 3rd blue bar.
Try this. I don't know if its better or worse so haven't updated the first post yet. It certainly picks up more in the chop.
pdawg
08-15-2007, 11:19 PM
OK, I haven't tried this latest version yet but the last version seems to be doing fine.
I got this from another board, from the person that provided that EL code you tranlsated:
"As far as how the indicator actually works, John's description of "three higher closes" is a bit misleading. I disregarded this criteria in the code. It is merely based on swing highs/lows. I'll give an example for a Scalper Sell:
1. You get a high that's at least as high or higher than the previous two bars. This bar is a potential paintbar.
2. The next bar makes a lower high; The low of this bar is the trigger.
3. From here, if we do not make a higher high and we get a close below the trigger, we paint the swing high bar. Concept is simple but was a bit tricky to program (for me, at least)."
So you may have already gotten it. I'll keep you posted.
Thanks.
P
buderim
08-16-2007, 01:16 AM
Hi Gumphrie,
thanks for this indicator, it looks really good.
I was wondering if it was possible to add a second color or chart marker to identify when the colored candle was formed ?
Thanks
Ian
Gumphrie
08-16-2007, 03:51 AM
I was wondering if it was possible to add a second color or chart marker to identify when the colored candle was formed ?
Yes, that's a good idea. It *should* be on the close of the candle above or below the trigger bar, so it always be three candles ahead.
Gumphrie
08-16-2007, 05:04 AM
I got this from another board, from the person that provided that EL code you tranlsated:
I didn't actually end up using that code as I couldn't work out what the exact equivalents to the swingHighBar/swingLowBar functions would be in NT. So I used the other code example which I had semi translated a while back and just took out all the EMA smoothing stuff.
Bogan7
08-20-2007, 07:09 PM
Hi guys so which is the best zip file to import is it the one at the beginning of the thread or the one on page 1?
Thks in advance
Gumphrie
08-20-2007, 07:20 PM
Hi guys so which is the best zip file to import is it the one at the beginning of the thread or the one on page 1?
At the moment go with the one in first post. The one posted later may be better, but until I get more feedback I wouldn't bet on it.
Bogan7
08-20-2007, 07:26 PM
At the moment go with the one in first post. The one posted later may be better, but until I get more feedback I wouldn't bet on it.
Thks for that
randyjb
08-23-2007, 06:50 PM
I downloaded the NT version developed for this thread, but in realtime trading it colors the bar far too late to be of much use in scalping. It could possibly be used to mark swing highs and lows, after the fact, for those who are looking at the most recent 3 swing points to assess short term trend.
For scalping, you would be far better served just watching price action versus S/R zones or even a low-lag Hull Moving Average rather than trying to depend on scalper buys and sells signaled a few bars too late.
Needless to say, I still tip my hat to those of you who are clever enough to code these things, especially for NT. You are truly to be commended for openly sharing your hard work in this manner.
Best Regards
pdawg
08-23-2007, 07:39 PM
randyjb,
You are correct. They way it's defined they get colored well after the fact. Carter even states he doesn't use them all by themselves. He uses them to signal off of key areas such as pivot levels, or to get ouit of a position. For example, he has said that if he gets a scalper signal the other way plus 2 consecutive TTM trend colored bars in the opposite direction he exits the position.
Gumphrie
08-23-2007, 07:46 PM
I downloaded the NT version developed for this thread, but in realtime trading it colors the bar far too late to be of much use in scalping. It could possibly be used to mark swing highs and lows, after the fact, for those who are looking at the most recent 3 swing points to assess short term trend.
For scalping, you would be far better served just watching price action versus S/R zones or even a low-lag Hull Moving Average rather than trying to depend on scalper buys and sells signaled a few bars too late.
Needless to say, I still tip my hat to those of you who are clever enough to code these things, especially for NT. You are truly to be commended for openly sharing your hard work in this manner.
Best Regards
Agreed, Scalper is its name, but its probably best as a swing confirmation tool.
Make sure you have the latest version off the first post as the v0.1 was 5 bars late, and the v0.2 was 4 bars late, currently it should only be 3 bars late, the same as other platform versions.
Thanks for the encouragement.
Gumphrie
08-31-2007, 01:29 PM
I was wondering if it was possible to add a second color or chart marker to identify when the colored candle was formed ?
After thinking about this you are right, it doesn't necessarily paint 3 bars ahead, only when it closes above or below the trigger bar, which could be several bars ahead.
So I've updated it to have the option of displaying arrows above or below any current trigger bars.
I've also found that the cpu load was unacceptable so I have also corrected that.
Please download from the first post.
whitegun
11-09-2007, 03:18 AM
Hi all,
I am wondering if ninjascript is really so much more complicated then easy lenguage or it is simply so in this special indicator!?:confused:
I was trying to make some changes to the code (divide the indicater in 2 diferent ones) so it only plots the high swings or only the low swing and can be used as a confirmation signal in a ATM swing strategy but no way.
Seams I eaven can not achive that the high scalp bar and low scalp bar are ploted with different coulors.:mad:
I am just starting with NT so maybe this is simply a very comlicated indicator but on the other hand I found on the web the code for TS for the same indicator and it seems 100 times simplier.:eek:
Please found attached the TS code and the NT code, there is a huge difference in complexity.
Gumphrie
11-09-2007, 03:38 AM
Whitegun,
Please don't redistribute my code without the comments at the top!
Yes, it is more complicated than the average indicator as its doing custom plotting (overriding the Plot class) for the bars and arrows. Most NinjaTrader indicators are just plain bar or line plots which aren't as complicated.
whitegun
11-09-2007, 04:46 AM
I am realy sorry Gumphrie, I did not noticed that I did not copied the comments at the top (it was not my intention)!
I just edited the atachment of my last post ading your comments
whitegun
11-09-2007, 08:43 PM
Hello Gumphrie,
Could you or someone else with more ninjascript expireance than me please tell me (help me) what I should add to your code so that a arrow is ploted under or above the bar which activates the scalper bar (if this is not a complicated modification), I mean, when a scalper UP bar is ploted that a UP arrow plots under the bar (bar 0) which just closed above the trigger bar and makes the scalper bar plot and the same for DOWN (sorry, not shure if I expres myselfe clear).
Gumphrie
11-10-2007, 01:58 PM
Hi Whitegun,
Isn't that the "Highlight current trigger bars" true/false config option in the properties? Do you have the latest version?
whitegun
11-10-2007, 10:53 PM
Hi Gumphrie,
Yes, I have the latest version but it is not the "Highlight current trigger bars" true/false config option what I am talkinig about.
At the moment there is absolutly no way to use scalper for a ATM strategy (this is how I see it, if I am wrong please correct me).
As scalper didn't is a plain bar or line plot but it is overriding the Plot class seams that it is not recognized at all in a ATM strategy, means, if I create a verry simple ATM strategy for test (using the strategy wizard) like: scalper(low)[3]>SMA(14)[3] go long (if 3 bars ago there is a scalper signal and the low of the scalper bar is higher than a 14day SMA 3 bars ago go long), the scalper is totaly ignored in the strategy, it simply enters long on the first bar (3 bars ago) above SMA.
However, the "Highlight current trigger bars" option can not be used in a ATM strategy because there would be a lot of wrong entries. When the arrow apear that not always means that you will get a scalper bar, if there is no close above or bellow the triger you simply get a new triger in an other place but you only wont enter if you get a confirmed scalper bar not only a posible one.
Please have a look at the atached picture:
What I mean is, bars that just made the scalper bar paint (bar 0 that closed above or below the trigger bar) get at the same time that the scalper bar is painted a arrow plotted above or below them.
In a ATM strategy the entry would be at the next bar after the bar with the arrow.
I suppose if now you would say: scalper(low)[0]>SMA(14)[0] enter long it should work (or am I wrong??)
Best Regards
Gumphrie
11-11-2007, 03:56 AM
Hi Whitegun,
Yes, there are two thing things that make it hard to use in any strategy.
1. It overrides the Plot class and doesn't actually write out any plots a strategy could pick up. You could get around this by creating another indicator using the same code that does write out a plot, but...
2. It colours in the bars retrospectively so anything you plot will not match up with the actual bars plotted.
That said, please find attached an indicator that has two plots, "ScalpUpSeries" and "ScalpDownSeries" in different colours. If you add it to your chart it will plot a positive value ("1") when a Scalp Up bar is detected and a negative value ("-1") when a Scalp Down Bar is plotted. So something like :
if (ScalpPlot.ScalpUpSeries[0]==1)
{
EnterShort(DefaultQuantity, "");
}
Very nice. This could be very useful if used in conjunction with other filters to eliminate the many uninteresting triggers which happen in the market goes sideways for a while.
I'm curious about the color scheme, and naming conventions, however. It would seem more intuitive to me if red & green were reversed, so a green indication preceded an uptrend, and if ScalpUpSeries were used to indicate time to EnterLong, etc.
Am I missing something here?
Gumphrie
11-11-2007, 06:03 PM
Hi KBJ
ScalpUpSeries represents a high bar being painted, so that's why you would go short, and vica versa. I see there could be confusion between 'going up' and 'had an up', in which case I was thinking of the latter. They're just names I picked up at random when I was hacking the original code, so feel free to change it or suggest new ones.
What's most important is that the indicator is available for use. Thanks for creating it.
whitegun
11-12-2007, 11:40 PM
Thank you verry much Gumphrie!
Its exactly what I need and was searching, it works great.
Thanks!!!
Regards
jackj90
12-12-2007, 03:03 PM
Hello Gumphrie,
I wonder if this indicator can be modified to KEEP the painted arrows on the chart?
It's a great indicator - Thank you very much!
Jack
Gumphrie
12-12-2007, 03:28 PM
I wonder if this indicator can be modified to KEEP the painted arrows on the chart?
Hi Jack, do you mean all of them or just the final ones? As the current trigger bar can change depending if it actually results in a scalp bar. You can easily populate a DataSeries to put all of them in, tricky bit will be taking out the redundant ones.
jackj90
12-12-2007, 03:57 PM
Hi Gumphrie
I meant all the PERMANENT ones.
I'm not a coder, so I have no idea what 'DataSeries' is..........
Even without keeping them all, its a wonderful indicator.
Thank you.
Jack
jackj90
01-09-2008, 03:04 PM
Hi Gumphrie and all,
Would anyone know how to add an audio alert with the painting of the up/down arrow?
Thanks,
Jack
NinjaTrader_Josh
01-09-2008, 06:31 PM
It would just be a matter of adding this function to the code when it paints up/down.
PlaySound()
http://www.ninjatrader-support.com/HelpGuideV6/PlaySound.html
jackj90
01-09-2008, 06:48 PM
Hi Josh,
Well, I added
PlaySound(@"C:\Program Files\NinjaTrader 6\sounds\Alert1.wav");
into the script, but I don't really know the script, or, where it would go.
Thanks anyway.
Jack
NinjaTrader_Josh
01-09-2008, 06:53 PM
Unfortunately I have not reviewed Gumphrie's code, but you would generally put it in the same code block that the indicator marks the bars with.
garciaal
01-10-2008, 12:34 PM
What is the most current ver, the on in post #1 or post #34 ?
Thanks,
Al
NinjaTrader_Josh
01-11-2008, 12:44 AM
I believe they are just different versions of each other. Pick and choose which one you want. Or take both?
cmrodrig
01-17-2008, 05:42 AM
Hello Gumphrie,
I'm wondering if you can help me on these 2 questions, because I saw your code and find a partial answer to it.
1) Could you indicate a method to calculate the number of bars in the current Chart View Area ?.
The reason is that I would like to Draw some Text or Plot some arrows on the charts, but depending on the scale of the chart, I need to know what is the Maximum / Low value of price in the current view area.
To plot one arrow in a 3 min chart, where the Max-Min value of current view are is 20 pts I can use this line of code:
DrawArrowDown("down", 0, High[0]+TickSize, Color.Blue);
However in one scale of 30 min, I have to ajust the Vertical position so that the arrow would be well above the candle:
DrawArrowDown("down", 0, High[0]+TickSize*5, Color.Blue);
How can I know the Max and Min value of the Current View Area of one Chart?
I think If I got the number of bars of current view area (not Bars.BarsSinceSession), but only the number of Bars that are currently displayed, in order to obtain the Max and Min.
Attached is one image that shows what I mean.
2) I've seen in your script a method to calculate the Size of current Chart View Area.
Height = (bounds.Y + bounds.Height) // like in your code
or Height = bounds.Size.Height; // would give the Height in pixels
The problem is that to access those bounds.... it seams to be necessary to include it in a function like this:
public override void Plot(Graphics graphics, Rectangle bounds, double min, double max)
That is declared outside the OnBarUpdate() procedure, and when the code goes to that procedure,
doesn't come back to OnBarUpdate() procedure.
The question is, how do we get these values without having to put them inside that procedure?
If we don't do that, we receive a error code saying:
the name 'bounds' doesn't exist in the current context
-------------
Help would be more then welcome.
Kind regards,
Candido
Hi Whitegun,
Yes, there are two thing things that make it hard to use in any strategy.
1. It overrides the Plot class and doesn't actually write out any plots a strategy could pick up. You could get around this by creating another indicator using the same code that does write out a plot, but...
2. It colours in the bars retrospectively so anything you plot will not match up with the actual bars plotted.
That said, please find attached an indicator that has two plots, "ScalpUpSeries" and "ScalpDownSeries" in different colours. If you add it to your chart it will plot a positive value ("1") when a Scalp Up bar is detected and a negative value ("-1") when a Scalp Down Bar is plotted. So something like :
if (ScalpPlot.ScalpUpSeries[0]==1)
{
EnterShort(DefaultQuantity, "");
}
Gumphrie
01-17-2008, 09:44 AM
The question is, how do we get these values without having to put them inside that procedure?
If we don't do that, we receive a error code saying:
the name 'bounds' doesn't exist in the current context
Hi Candido,
All that stuff is confined to the Plot class as you say.
The bounds stuff is related to pixels I think, take a look at ChartControl.LastBarPainted and ChartControl.BarsPainted, they may give you something closer to what you're looking for.
Gumphrie
01-19-2008, 04:54 PM
Regarding your first question, yes that's the kind of fiddly problem that can be annoying. You just have to find a "happy median". If its at least a ticksize away you know you cannot collide with the candle even if it doesn't look great in all cases. I'm sure there must be better way, but one doesn't spring to mind...
monpere
01-19-2008, 07:10 PM
Try creating some global scope public variables for the values you want, and assign them within the plot method, so then the values you want will now be available outside of the plot method.
Regarding your first question, yes that's the kind of fiddly problem that can be annoying. You just have to find a "happy median". If its at least a ticksize away you know you cannot collide with the candle even if it doesn't look great in all cases. I'm sure there must be better way, but one doesn't spring to mind...
cmrodrig
01-25-2008, 08:14 PM
Gumprie,
Thanks for the suggestions.
I came up with this code, to calculate an average distance to plot something away from a candle, based on a conversion of Points to Pixels.
double Height = ChartControl.Bounds.Height;
int xBars = ChartControl.BarsPainted-1;
double xHigh = MAX(High, xBars)[0];
double xLow = MIN(Low, xBars)[0];
xPixels = 50*(xHigh-xLow)/Height; // 50 Pixels translated to Points
ChartControl.Bounds.Height as the number I wanted with Plots.Bound
Thanks for all
monpere
01-25-2008, 09:06 PM
Cool,
Now, has anyone found a way to convert the Y value of a pixel on a chart, to its equivalent price on the price scale? NT Support, is mum about this. The best I can come up with is to get the high and low of all the bars painted on the screen, and use that along with the height of the screen in pixels to get an approximation.
Gumprie,
Thanks for the suggestions.
I came up with this code, to calculate an average distance to plot something away from a candle, based on a conversion of Points to Pixels.
double Height = ChartControl.Bounds.Height;
int xBars = ChartControl.BarsPainted-1;
double xHigh = MAX(High, xBars)[0];
double xLow = MIN(Low, xBars)[0];
xPixels = 50*(xHigh-xLow)/Height; // 50 Pixels translated to Points
ChartControl.Bounds.Height as the number I wanted with Plots.Bound
Thanks for all
Gumphrie
01-26-2008, 07:58 AM
Probably could work it out from the inverse which is :
int y = (bounds.Y + bounds.Height) - ((int) (((PRICE - min) / ChartControl.MaxMinusMin(max, min)) * bounds.Height));
Where y is the pixel value and PRICE is the price and the max and min are inputs to the Plot method.
Cool,
Now, has anyone found a way to convert the Y value of a pixel on a chart, to its equivalent price on the price scale? NT Support, is mum about this. The best I can come up with is to get the high and low of all the bars painted on the screen, and use that along with the height of the screen in pixels to get an approximation.
monpere
01-26-2008, 02:03 PM
Not sure if that gets me what I want. Basically, if you choose the crosshair cursor, and move the cursor to any point on the chart, I want to get the price at the right edge right axis of the chart that the horizontal cursor line is displaying (also shows in minidatabox). Right now, I can get the pixel where the horizontal cursor is at, but can't find the info that relates the horizontal line to the price.
Probably could work it out from the inverse which is :
int y = (bounds.Y + bounds.Height) - ((int) (((PRICE - min) / ChartControl.MaxMinusMin(max, min)) * bounds.Height));
Where y is the pixel value and PRICE is the price and the max and min are inputs to the Plot method.
cmrodrig
01-26-2008, 07:23 PM
Probably could work it out from the inverse which is :
int y = (bounds.Y + bounds.Height) - ((int) (((PRICE - min) / ChartControl.MaxMinusMin(max, min)) * bounds.Height));
Where y is the pixel value and PRICE is the price and the max and min are inputs to the Plot method.
Problem here is that bounds.Y is not recognized, and an error saying The name 'bounds' does not exist in the current context is generated.
Because of that, I suggested the alternative ChartControl.Bounds.Height, that does not produce an error when compiling.
Where can we find documentation about this type of data, in MSDN site ?
Regards,
monpere
01-27-2008, 08:25 PM
Aha! min, max where the missing pieces. I never previously looked at the plot parameters at all. I also used CanvasTop,CanvasBottom instead of Height.
Thanx Gumphrie
Probably could work it out from the inverse which is :
int y = (bounds.Y + bounds.Height) - ((int) (((PRICE - min) / ChartControl.MaxMinusMin(max, min)) * bounds.Height));
Where y is the pixel value and PRICE is the price and the max and min are inputs to the Plot method.
Mike_32
05-07-2008, 09:09 AM
Only problem I found with this indicator is it doesnt update.
If you put it on 5 min bars and leave it for an hour or so.
Then come back and right click on the chart and click indicators and then just click apply straight away you will see 3-4 signals pop up that didnt come.
Anyway to fix this and or have it auto refresh?
Gumphrie
05-08-2008, 08:03 AM
Hi Mike,
I did as you suggested, applied it to a 5 min chart and left it. It still updates for me once the trigger bars are broken. Try using the highlight trigger bars option and see if there is still a problem.
Mike_32
05-08-2008, 08:47 AM
Gumphrie what ive found is if I have it on the same chart as autotrendline this is when it does it.
If I have it on a chart by itself there is no issue.Also when its on the same chart as autotrendline, when I click the indicators then apply there is always a lag delay.This must be something to do with the calculations of the trendline indicator.Which doesnt come and go as quick so it lags a bit.
So basically have them on seperate charts and no problem.
So its not the scalper indicator its just how it works and using on same chart as autotrendline which does more calculations it lags the scalper indicator.
Also is this indicator based on anything to do with ZigZag because if you put a ZZ on the same chart it seems to come and go at similar points.
Thanks.
ericadam
08-30-2008, 10:08 PM
Hello all! Has there been any updates to this indicator at all since the last post? Thanks!
Gumphrie
08-31-2008, 06:52 AM
No, none at all.
ericadam
08-31-2008, 08:42 AM
Thanks. Which post contains the most recent version? Thanks!
Gumphrie
08-31-2008, 10:27 AM
Thanks. Which post contains the most recent version? Thanks!
The first one.
eswap0
09-14-2008, 05:04 PM
Many thanks for your nice work and for posting it!
pgabriel
06-02-2009, 08:45 AM
Is it possible to put an audio alert on the scalper....?
NinjaTrader_Bertrand
06-02-2009, 08:56 AM
Sure you can open the code in the NinjaScript editor and work the PlaySound method in - http://www.ninjatrader-support.com/HelpGuideV6/PlaySound.html
pgabriel
06-02-2009, 10:23 AM
I tried placing playsound after the draw arrow statement but it sounds on every tick...I put it in the wrong place...?
NinjaTrader_Bertrand
06-02-2009, 11:07 AM
pgagabriel, unfortunately I'm not familiar with the custom code you're working in, when you need more options to customize your alert you can use Alert() - http://www.ninjatrader-support.com/HelpGuideV6/Alert.html
Also: which CalculateOnBarClose setting do you use with this indicator?
pgabriel
06-02-2009, 12:10 PM
Sorry but I am not a programmer so this is beyond me...I just wanted to add the code to create an audio alert on the scalper incicator when it shows an arrow or colors a bar....
NinjaTrader_Bertrand
06-02-2009, 12:33 PM
pgabriel, you can always ask the original author if your desired changes can be worked in - if you need this custom programmed professionally you could contact those NinjaScript consultants - http://www.ninjatrader.com/webnew/partners_onlinetrading_NinjaScript.htm
Trade1953
12-18-2009, 03:24 PM
Hey Whitegun,
I sent your TS text file to a friend who uses Tradestation and he made the indie. He said it prints the confirmed Scalper Bars just fine but no arrows. Is there any way to add Show Trigger Bars in the TS version to print an arrow like it does in Gumphrie's Scalper? I'm personally having great success in trading only with this indicator, but I depend on the arrows to print to place the orders before a confirmed Scalper bar prints. My friend wants to duplicate what I'm doing, but he's a die hard Tradestation fan.
On a second note, do you know how to add a sound alert to Gumphrie's Scalper indicator where it won't play on every tic? I've tried everything, including setting bool variables when it draws an arrow but the sound plays on every tic. I don't get this since CalcOnBarClose is True. There doesn't seem to be an answer in the forum on how to make PlaySound only play once when an arrow prints. I don't want to pester Gumphrie, but I really need this alert so I don't have to watch the screen every second. If you can help, that would be great and much appreciated.
Thanks!!
Joe
J_o_s
03-03-2010, 07:53 AM
Looks like a promising indicator in hindsight, too bad that the signals generated when trading in real-time are so lagging. Does anyone trade with this indicator, and if so, how do you use it? Anyone find a way to use this nice-looking indicator in real-time trading?
Gumphrie
03-03-2010, 09:02 AM
Updated first post with new version that has options for playing alerts on new scalper bars and new/removed trigger arrows. Better late than never :D
Also people keep asking me about whether the indicator can be made any less lagging. It's just the ways it works with pivot points, I don't know any secret technique, the best advice I know is to do as Trade1953 does and follow the alert arrows for indication of where the next scalp will be.
gdplus1
03-19-2010, 11:09 AM
I'm personally having great success in trading only with this indicator, but I depend on the arrows to print to place the orders before a confirmed Scalper bar prints.
Can you please show us some examples on how you use the scalper indicator and on what instruments ES, YM, TF, NQ, 6B, 6E, 6J and timeframes? Please post some charts and it will help one and all and especially newbie traders.
Regards. :)
Jumper
03-26-2010, 05:02 AM
I don't get this indicator, so it paints a bar white after the fact? How is that useful?
drzb786
03-26-2010, 12:22 PM
thank you very much for your update........use it on 30 tick chart to 5min :)
krisT
03-26-2010, 11:21 PM
Folks, thanks to everybody who worked on this indicator. It would be very helpful for a beginner like me if someone can enhance it to show an Up Arrow (Green Color) right underneath the actual Bar or a Red Arrow right above the price bar as the case may be. That way it would be easy for us Ninja Trader users. I have seen a similar thing in Trade Station some time ago. Any programmers who can help in this matter? Thanks in advance.
Mindset
04-07-2010, 06:50 AM
Gumphrie and/or others
Is it possible to place an arrow in a stringbuilder?
I utilised your great arrow code but am having the devil's own job to locate the arrow as it changes size when autoscaled.
Essentially what I want to do is Have say a down arrow and the previous Low in one 'string'.
I attach my version of this indicator.
Also a pic of the issues I am having.
I really really struggle with points,floats,gdi,x and y coords.
This is NT7 BTW.
Ralph
04-07-2010, 02:38 PM
Mindset,
Arial (for instance) has characters displaying triangles, U+25B2 is a triangle-up and U+25BC is a triangle-down. For example, you could preceed your string with these characters: '\u25b2' + " Arrow up"; '\u25bc' + " Arrow down";
Regards
Ralph
Mindset
04-08-2010, 01:40 AM
Ralph
I need some more help with this
here is my code
char[] chars1 = new char[4];
chars1[0] = '\u25b2';
graphics.DrawString(chars1+"Arrow up"+lowstring.ToString() , txtFont, textBrush, stringX, stringLowYNBar);
I get System.Char[] Arrow up then the low price as the text?
Ralph
04-08-2010, 02:06 AM
You get a string consisting of three parts:
The symbol depicting a filled triangle showing up
string "Arrow up"
content of string lowstring
Regards
Ralph
Jumper
04-08-2010, 02:22 AM
Anyone want to have a go at answering me? As far as I know, this indicator paints a bar white after the fact? Get a move up, big volume, comes back off, THEN it paints it white. How does anyone use this effectively? I'm not picking on it, just curious, I think its a good idea, just can't see how it could be of any use how it is?
Mindset
04-08-2010, 02:38 AM
Aha
I have to use chars1[0].ToString();
I have got it - thanks Ralph
graphics.DrawString( chars1[0].ToString()+" " +lowstring.ToString() , txtFont, textBrush, stringX, stringLowYNBar);
Ps I have googled and looked on msdn site - where can you find a list of all these unicode characters?
Ralph
04-08-2010, 05:10 AM
You don't really need to define a char-array you could apply:
graphics.DrawString("\u25b2 " + lowstring.ToString() , txtFont, textBrush, stringX, stringLowYNBar);
or if you prefer to operate more generic, then simply pre-define a string containing the unicode-char and the blank:
string triangleUp = "\u25b2 ";
graphics.DrawString(triangleUp + lowstring.ToString() , txtFont, textBrush, stringX, stringLowYNBar
If I search for special characters, I execute 'charmap' in the Windows XP command execution window. I use the german XP and therefore not sure what the buttons named you need to click to find that window, maybe: Start->Execute.
Regards
Ralph
TraderSU
05-27-2010, 12:06 AM
Bar painting happens with the lag of 1 or 2 candle so it looks great when you look at historical chart but realtime is not so great.
Did someone try to make strategy out of it? I tried but logic and rendering is so mixed up, it started to spin my head. Is there a pseudo code available for the logic?
EDIT: The post by OP at "11-11-2007, 04:56 AM" has an attachment with pure logic in it. Thanks.
chinapassage
05-12-2011, 12:46 PM
has anybody fixed this for the lastest ninja.... i am getting this problem on historical bars where it takes off of price ... so graphically messed up a bit... is there an solution to this ... here is the way it looks on all my charts: http://screencast.com/t/kt8TT7PNVy
Mike_32
05-23-2011, 08:32 PM
has anybody fixed this for the lastest ninja.... i am getting this problem on historical bars where it takes off of price ... so graphically messed up a bit... is there an solution to this ... here is the way it looks on all my charts: http://screencast.com/t/kt8TT7PNVy
I see what you mean with the bar paint in history being all over the place its probably due to how NT7 does it data series different which is not written in the old scalper code.
But you can use ScalperRT which is exactly the same but just puts an arrow instead of a bar paint.
chinapassage
05-24-2011, 04:16 PM
thanks mike,
yeah the RT i am not to fond of ... and they seem to show to many pivots verses the normal scalp bar ... it is due to i think it is set so that update on close is taken off inside the code somehow and you get the intrabar signals with RT ... where as the older one paints only after the close of a bar.
so still huntin for the one that works with 7.0
laredo78676
05-24-2011, 06:31 PM
Ive got a Tand S ticker running,Ive got NT7 feeding ensign,but I dotn have a euro chart NT7 updating?
Mike_32
06-15-2011, 03:02 AM
thanks mike,
yeah the RT i am not to fond of ... and they seem to show to many pivots verses the normal scalp bar ...
Its not, they are the same, put them both on the same chart and watch for an hour.
Just RT has the arrows is all to show the bar where the scalp bar actually comes in the future data.
The bar close thing is in the settings when you add it to the chart the code inside it is the same except RT has draw.arrows and the original has a sound alert.
chinapassage
06-17-2011, 03:02 PM
Mike your right sorry about that ... went back over and checked it against my TS and didnt see any differences ... a year or so ago when i first did that i could have sworn RT was firing a lot more than my scalper on TS ....
still would be nice to fix the graphic issue on these paint bars as i prefer the option of no arrow ... heres a look at comparing the two together ... seems to get all whacky in historical data http://screencast.com/t/fxL9HWDx