Need help dissecting SSBO Indicator.

Post Reply
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Need help dissecting SSBO Indicator.

Post by Radar »

Hey gang,

I've been looking at the code for the SSBO indicator, and giving myself a major headache trying to understand it :( I want to (eventually) modify it to change the trade & money management system, as what's in there now doesn't suit my personality & risk profile.

Usually, I just follow the variables through the functions, and I can eventually nut out what's going on, but with this one, most of the variables have meaningless names, like i0, g0, t1, etc, so I end up totally lost:(

Add to that lines of code that seem to be some sort of syntactical short-hand, and I've got no idea what it's doing, or how it's doing it :(

I look at that code, then look at what I do, and I feel like the guys that put this together are riding the stars, and I'm on a pushbike, with broken pedals, no tubes or tyres, and buckled rims :(

Could some kind soul please throw some comments into the code that will help me understand what's going on where, so that I can give the variables meaningful names, and eventually edit it to suit my trading style and goals, thank you.

With your help, I'll be able to get much closer to the goal I've been struggling to achieve since I first saw the SSBO thread, and Squalou's original indicator.

Take care,

&

Have fun!

Radar =8^)
You do not have the required permissions to view the files attached to this post.
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
Radar
Trader
Posts: 437
Joined: Fri Mar 23, 2012 5:39 pm
Location: Round the bend ;)

Need help dissecting SSBO Indicator.

Post by Radar »

I'll have a shot at some of it...

Can this be replaced with LifeSys' PFactor function?

Code: Select all

int init()
 {
mult=MathPow(10,(MathRound(Digits*0.5)!=Digits*0.5)); // factor = PFactor(Symbol()); ?
_Range=BoxRange*mult*Point; // Range = BoxRange / factor; ?
BPips=BoxBufferPips*mult*Point; // BPips = BoxBufferPips / factor; // ?
}
The next one is pretty tricky... (from init())

Code: Select all

	i5=StringLen(FibSequence);
	i3=1;
	i1=0;
	while(i1<=i5-1)
	{
		i2=i1;
		while(i2<=i5-1 && StringSubstr(FibSequence,i2,1)!=",") i2++;
		s1=StringSubstr(FibSequence,i1,i2-i1);
		Fib[i3]=StrToDouble(s1);
		i3+=(i2-i1>0); // if ((i2 - i1) > 0) Add (i2 - i1) to i3 ??
		i1=i2+1;
	}
Hmmm... The array Fib[] has 20 elements, and the string FibSequence has 9 values, separated by commas... We pull each value up to (but excluding) the comma, and place them in the array, starting at element 1 (not element 0), but after that, nothing else is placed into the array.

That's as far as I am able to get. :(

How am I going so far?

Have fun!

Radar =8^)
Check out my new, (well, old now), manual trade & automatic scale-in manager,
StackManV2
Post Reply

Return to “Coders Hangout”