Skip to content

Instantly share code, notes, and snippets.

@mrjazz
Created May 3, 2016 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mrjazz/4556a88988345a66078238a3d7856644 to your computer and use it in GitHub Desktop.
Save mrjazz/4556a88988345a66078238a3d7856644 to your computer and use it in GitHub Desktop.

Correction price logic

System looking for indicators that impact on price and according to type of indicator, calculate price include koefficient. This coefficient will be applied to next positions until section won't be finished or new indicator meet.

Case sensetive volume indicators:

  • '10cl' : 0.133333333
  • '5cl' : 0.066666667
  • '1500ml' : 2
  • '750ml' : 1
  • '500ml' : 0.666666667
  • '375ml' : 0.5
  • '300ml' : 0.4
  • '250ml' : 0.333333333
  • '150ml' : 0.2
  • '125ml' : 0.166666667
  • '100ml' : 0.133333333
  • '50ml' : 0.066666667
  • '150 cl' : 2
  • '75 cl' : 1
  • '50 cl' : 0.666666667
  • '37.5 cl' : 0.5
  • '37,5 cl' : 0.5
  • '30 cl' : 0.4
  • '25 cl' : 0.333333333
  • '15 cl' : 0.2
  • '12.5 cl' : 0.166666667
  • '12,5 cl' : 0.166666667
  • '10 cl' : 0.133333333
  • '5 cl' : 0.066666667
  • '1500 ml' : 2
  • '500 ml' : 0.666666667
  • '375 ml' : 0.5
  • '250 ml' : 0.333333333
  • '150 ml' : 0.2
  • '125 ml' : 0.166666667
  • '100 ml' : 0.133333333
  • '50 ml' : 0.066666667
  • '1.5L' : 2
  • '1.5 L' : 2
  • '1,5L' : 2
  • '3L' : 4
  • '5L' : 6.666666666

Case insensetive volume indicators:

  • 'small' : 0.233333333
  • 'large' : 0.333333333
  • 'half bottle' : 0.5
  • 'by the glass' : 0.233
  • 'bottle' :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment