Has anyone seen FX_Sniper lately?

 

I know he pretty much abandoned trying to help people on the forums since it cost him so much time and energy. I have a programming problem that I know he's solved before. I can't figure out anyway to contact him, however. The Gmail account he has listed (on this or another site) returns email as "undeliverable" as well as his hotmail account. I've tried PMing him on this forum, but I get this error: "FX_Sniper has chosen not to receive private messages or may not be allowed to receive private messages. Therefore you may not send your message to him/her."

I know he's not looking to be contacted. The reason I'm looking to contact him is because he's solved this issue before and could tell me where I'm going wrong in less than 5 minutes. He's also the only person I know who's solved this problem.

If anyone is in contact with him, please let him know that I'm looking for his guidance for only a few minutes. Or if you actually have his contact information, please PM it to me and I can plead my case with him.

-Matt

 

What's your problem ?

 

This post describes my situation.

 
mrebersv:
This post describes my situation.
mrebersv:
...and divide by one since it's only one timeframe apart, but that doesn't need to actually be computed since it doesn't affect the number.

If you want to obtain something significant, the slope should be expressed in pips/minute, or in pips/hour and not in pips/TimeframeUnit. So you have to divide by Period or by Period*60.

Hope this help

 

Thanks for the reply. I'll get to that change as soon as I can today.

 

Well, I'm still having the same problem. Attached is the code for my "indicator" as well as the real indicator (though this is just in .ex4 form, not .mq4). My indicator prints some values to the top left corner of the window that are used in the calculation for the sidewinder. Mine shows the information for the last complete bar, not the current bar. The "angleLsma" result should be the angle of the lsma between the last complete bar and the bar immediately prior to the last complete bar.

The 'sidewinderValue' is the sum of the two angles. When the actual sidewinder indicator (FX Sniper's) is green, my sidewinderValue should be over 100. When the actual sidewinder is red, my sidewinderValue should be less than 75. Between 75 and 100 are supposed to be when the real thing is yellow. If you test this out, it doesn't hold true. Also, the "angles" reported by my indicator are never less than zero as they should be.

Any ideas?

 

At first look, there maybe a mistake calling LSMA() : shift should be 0 and 1 as you have already a one bar offset in the func: for(i = length; i >= 1 ; i--)

Another mistake may be here :

(lsma25/oldLsma)/timeframe*1000; shouldn't be (lsma25-oldLsma)/timeframe*10000; or better : (lsma25-oldLsma)/(Period()*Point); ???

 

LOL! I don't know how I missed that so many times.

Attached is my latest version. I did NOT incorporate the suggested LSMA() change. The reason for outputting the LSMA value is to double-check these things. If the function call is "LSMA(25,0)," the output for lsma25 changes if the current bar has enough movement to affect the lsma25. This tells me that it takes the current bar into account if there is a shift of 0. *Note: the LSMA() code isn't mine. I found it quicker to copy the code from an indicator I already had than to rewrite it. Thanks to whomever originally coded that (FX_Sniper?).

I'm still having an issue, however. The angles reported are quite close to what I get with the "Trendline by angle" tool in MT4, IF you multiply the values reported by my "indicator" by 10. I don't know why this would need to happen, and I'm qualifying my lack of understanding as an issue with the indicator. Also, I still don't think the sidewinderValue values line up with what it's "supposed" to based on the formulas posted online.

I feel like I'm learning about programming for the first time with all these little issues. Anyway, if you could shed anymore light on this, I'd be very appreciative.

 

You are right about the shift of the LSMA func, I didn't read the code enough carefully: in fact, when i==length, close[0+shift] is involved.

About the 10 factor, it seems that you compare apples and peers. Your slope is expressed in pip/minute and is invariant against the timeframe or the zoom of the chart, this means that its visual representation as an angle will be variable folowing the zoom, but the "Trendline by angle" tool is totaly static, fix, against the timeframe or the zoom : the line and the angle are constant even if you change the timeframe. If you look at a M1 chart, your angle should be correct.

Now, I don't really understand why you try to use angles, just using the slopes should be easier and more understandable (from my point of vue...)

mrebersv:
LOL! I don't know how I missed that so many times.

Attached is my latest version. I did NOT incorporate the suggested LSMA() change. The reason for outputting the LSMA value is to double-check these things. If the function call is "LSMA(25,0)," the output for lsma25 changes if the current bar has enough movement to affect the lsma25. This tells me that it takes the current bar into account if there is a shift of 0. *Note: the LSMA() code isn't mine. I found it quicker to copy the code from an indicator I already had than to rewrite it. Thanks to whomever originally coded that (FX_Sniper?).

I'm still having an issue, however. The angles reported are quite close to what I get with the "Trendline by angle" tool in MT4, IF you multiply the values reported by my "indicator" by 10. I don't know why this would need to happen, and I'm qualifying my lack of understanding as an issue with the indicator. Also, I still don't think the sidewinderValue values line up with what it's "supposed" to based on the formulas posted online.

I feel like I'm learning about programming for the first time with all these little issues. Anyway, if you could shed anymore light on this, I'd be very appreciative.
 

Well, I'm using angles because I know what the sum of the two are supposed to come out to for the different colors of the real sidewinder. Since my initial goal is to clone that indicator, I'm using it for comparison.

Well, this code is now based on the minute-by-minute slope. Observation with this on a 1m timeframe does two things. The angle-by-trendline angles do match up. Also, the sidewinderValue numbers do NOT match up with the sidewinder, so maybe I have the wrong values for those colors.

In actuality, I do not want the slope to based on a 1m timeframe unless I'm on a 1m chart. That's why I initially had this:

mrebersv:
...and divide by one since it's only one timeframe apart, but that doesn't need to actually be computed since it doesn't affect the number

In an attempt to change, I'm still doing something wrong. To take the slope for whatever the timeframe of the chart is, I thought I'd just change

double slopeLsma = (lsma25-oldLsma)/(Period()*Point);[/CODE]

to

[CODE]double slopeLsma = (lsma25-oldLsma)/Point;

.

After doing this, however, the angle reported is much larger than that observed with the "trendline-by-angle" tool. About 3 times larger in fact. Any ideas?

 
mrebersv:
To take the slope for whatever the timeframe of the chart is, I thought I'd just change
double slopeLsma = (lsma25-oldLsma)/(Period()*Point);[/CODE]

to

[CODE]double slopeLsma = (lsma25-oldLsma)/Point;

.

Doing that, you will have the slope expressed in pips by timeframe unit, and I think you are looking just for the opposit, ie to have a slope without relationship with the timeframe. That's why I sugest you to use a fixed time as unit, like 1 min or 1 hour but something which has nothing to do with the graphical representation of the slope itself, so when you zoom or change the timeframe, the grafical representation of the slope will follow your changes.

Maybe you should first write a test indic which drawn the slopes (trend lines) to visualise them and see if they are correct or not.

Now the angles. If you arctan the slope to get an angle, and if the slope is not correlate to the frame, your angle will be constant against zoom or timeframe change, ie meaningless. Anyway an angle is always meaningless outside of a particular frame.

Once more, you can add the slopes if they have the same units, and match the resulting slope with some color if you want; but I do not know the original indic, maybe you can upload it here so I can see how it works.

Reason: