# SmartCJ Wiki

### Site Tools

Translations of this page:

# Documentation index

• ReadMe
• Things To Know
• Thumbs CMS
• Admin Area
• Traffic Rules
• Custom Galleries
• Tube Sites
• Old Style Rotation
trade_formula

# Trade Formula

Trade Formula – a formula used by script to calculate priority of each trade. Higher priority means more hits to this trader. Simplified view is presented by classic 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  ```

0.3, 0.6 and so are weight parameters that define impotance of each number. In this example HOUR_OWED (hourly owed) 2 times less important then TOTAL_RELOWN (total relative own).

Here is some formulas offered by our users:

`1; \$_POST[priority] = @round( (\$d['day']['ctd']+\$d['day']['cud'])/\$d['day']['od']* \$d['trat'] / 100);`
`1; \$_POST[priority] = @round( (\$d['day']['rd'] * \$d['trat']) / (\$d['day']['od']+1) * 100)`
```1; \$_POST[priority] = round ( (( ( (\$d['day']['thishourct']+\$d['day']['thishourcu'])/(\$d['day']['thishouro']+1)*100)/3) // 3 - hour weight
+(((\$d['day']['ctd']+\$d['day']['cud'])/(\$d['day']['od']+1)*100)/2)) // 2 - day weight
*pow(round(((\$d['day']['last_click'])/(\$d['day']['od']+1))*100)/100,1) ); // 1 click again weight```
```1; if ( ( ( (\$d['day']['thishourct']+\$d['day']['thishourcu']) / (\$d['day']['thishouro']+1)*100)/3)
+ (( (\$d['day']['ctd']+\$d['day']['cud']) / (\$d['day']['od']+1)*100)/2)  > 900) {
\$_POST[priority] = ((\$d['day']['rd'] * 900)/(\$d['day']['od']+1));
} else {
\$_POST[priority] = round ( ((((\$d['day']['thishourct']+\$d['day']['thishourcu'])/(\$d['day']['thishouro']+1)*100)/3)
+(((\$d['day']['ctd']+\$d['day']['cud'])/(\$d['day']['od']+1)*100)/2)) );
}```

Variables

```\$d[trat] - trade ratio

\$d[day] => Array
(
[rd] => rows
[ud] => uni
[od] => out
[cd] => clicks daily
[ctd] => clicks trade daily
[cud] => clicks url daily
[quality] => quality to trade (prod using quality settings)
[quality_url] => quality to url(prod using quality settings)
[pr] => in prozy count
[pr_out] => out proxy count
[ch] => cheat
[ncd] => next click count
[last_click] => last click count
[thishouru] => this hour row
[thishourr] => this hour uni
[thishouro] => this hour out
[thishourct] => this hour  click trade
[thishourcu] => this hour  click url
[thishourcq] => this hour quality
[thishourcq_url] => this hour quality url
[thishournc] => this hour next click
)

[prod] => Array
(
[hour_trade] => prod to trade
[hour_total] =>
[day_trade] =>
[day_total] =>
[hour_out2click] =>
[day_out2click] =>
)
```
trade_formula.txt · Last modified: 2017/03/16 11:06 by admin

### Page Tools 