custom formula

Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

custom formula

Post by Fett »

Its fantastic that you can write your own custom trade formula! SCJ is so advanced! (I am coming from te3)

But where do I find info on how to do this? There are some ready made ones in manual, by other users, but I need the variables that can be used, what they mean, etc. What operators I can use etc.

Basically I want to trade 24 hrs unique clicks (75% weight) and 24 hrs raw clicks (25% weight) against my raw outs. I also want country quality discounts and NOjs, proxy discounts to go in the formula.

I would need 75% daily and 25% hourly weight for this.

Basically to reward trades with most unique clicks of 24 hours, with country and other discounts also applied.
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: custom formula

Post by admin »

Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: custom formula

Post by Fett »

okay, thanks!
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: custom formula

Post by admin »

NP)
Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: custom formula

Post by Fett »

so your default formula

TOTAL_OWED*0.3 +
HOUR_OWED*0.3 +
HOUR_HITS*0 +
HOUR_TRADE_PROD*0+
HOUR_PROD*0 +
TOTAL_HITS*0 +
TOTAL_TRADE_PROD*0+
TOTAL_PROD*0 +
TOTAL_OUT2CLICK*0 +
HOUR_OUT2CLICK*0 +
TOTAL_RELOWN*0.6 +
HOUR_RELOWN*0

basically takes into account only 3 things, total owed, hour owed, total relative owed right?

or what is RELOWN?

because all other factors are multiplied by zero, and multiplying a number by zero equals zero, so those factors are not used?
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: custom formula

Post by admin »

or what is RELOWN?
own/trade size

because all other factors are multiplied by zero, and multiplying a number by zero equals zero, so those factors are not used?
yes
Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: custom formula

Post by Fett »

is this

HOUR_OUT2CLICK

same as "effect" (clicks/outs)

?
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: custom formula

Post by Fett »

=@round($d['day']['cd']/$d['day']['od']);

is an example I find at your wiki:

http://smartcj.com/wiki/doku.php?id=user_field


so I paste and save....then I get: code error


?

also when I copy paste any of the formulas created by other users posted in your wiki,

Priority changes to zero for all trades

?

Cany you recommend somebody to write algo, I cannot understand plus obviously there is a total lack of "how to" write algo in the wiki. Whats there is nothing it does not help to underatnd it.

I also see the wiki is outdated at many places. Plus full of typos even at the algo variables section.

here: http://smartcj.com/wiki/doku.php?id=trade_formula

here for example: (from wiki)

[thishouru] => this hour row
[thishourr] => this hour uni


I guess you mean the opposite:

[thishouru] => this hour uniques
[thishourr] => this hour raws

Thanks
admin
Site Admin
Posts: 37202
Joined: Wed Sep 10, 2008 11:43 am

Re: custom formula

Post by admin »

Sorry, I couldn't find

=@round($d['day']['cd']/$d['day']['od']);

at

http://smartcj.com/wiki/doku.php?id=trade_formula

formula should something like

1; $_POST[priority] = @round($d['day']['cd']/$d['day']['od']);
Don't forget to run script update
Fett
Posts: 85
Joined: Tue Feb 28, 2017 1:23 pm

Re: custom formula

Post by Fett »


=@round($d['day']['cd']/$d['day']['od']);

is an example I find at your wiki:

http://smartcj.com/wiki/doku.php?id=user_field


so I paste and save....then I get: code error
I will experiemnt and show here the formula for you than you can please check out verify for syntax error and such. This is very cool that the sourcecode is open and you can write your own, I love it!

:ugeek:
Post Reply