Author Topic: user variable as if condition [TCKT03062013ASIF]  (Read 2580 times)

Tags:
  • Élite
  • Posts: 110
*
Hi,

After quite some time off, I'm trying to get at terms with latest MF version.

I have a simple question:

At the beginning of my trigger I'm defining a couple of user variables. Now I want to use these variables in my trigger conditions.

For example I create the user variable "GAP": =r_4_back_price/r_3_back_price.

Now I want to define the condition to bet if GAP>2.

How can I set this condition into the conditions window?

I know I can set an "if condition" under "amount" or "price"  but for easier developing of a trigger it would be much better if I could use the user variable in the condition window.

For example:

Condition:

user variable "GAP" is greater than 2.

Is it possible? That's especially useful if one creates more than 2 or 3 user variables.

Looking forward to getting some ideas.

Cheers,
hegisin

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: user variable as if condition
« Reply #1 on: 03 Jun 2013, 10:00 »
hi
use
and selections trigger expression gap is equal or greater than 2


mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • Élite
  • Posts: 110
*
Re: user variable as if condition
« Reply #2 on: 03 Jun 2013, 12:46 »
Hi McBee,

Many thanks for quick reply. Yeah, that's pretty easy and obvious.  It seems that I've forgotten about the basics.  ::)

I assume that would work also with any other variable, even if the character of it is more of a market variable?

For example, I create a user variable "Forecast_Book" which shall return the book percentage of the top three forecast runners.

Variable "Forecast_Book" is calculated as follows:

((1/(r_1_silk_numerator/r_1_silk_denominator+1))+(1/(r_2_silk_numerator/r_2_silk_denominator+1))+(1/(r_3_silk_numerator/r_3_silk_denominator+1)))*100

Now, can I use:

Selection's  Trigger Expression  "Forecast_Book" is greater than 70 ; although Forecast_Book is not related to a specific selection?

Cheers,
hegisin

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: user variable as if condition
« Reply #3 on: 03 Jun 2013, 12:56 »
hi
yes, because a variable is a name with a value or word, a variable is only connected to a selection when you use it as a condition for a selection.


mcbee
Please read the following  disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • Élite
  • Posts: 110
*
Re: user variable as if condition
« Reply #4 on: 03 Jun 2013, 13:12 »
Hi McBee,

Alright, thanks again for clarification.

Cheers,
hegisin

 

Please note, BetFair is seems to be currently OFFLINE