Author Topic: remembering min/max price per selection  (Read 3138 times)

Tags:
  • All members
  • Posts: 90
  • Karma: +3/-0
remembering min/max price per selection
« on: Wed, 21 September, 2011, 13:28 »
Hi,

How can I set a user variable per selection ?

Similar to the trailing-green-up example, I want to remember minimum lay price and maximum back price, but not only for the favorite but for all selections, so I can address them by s_1_maxbp, s_2_maxbp etc.

Trying this with the conditions:
Any selections backprice is between maxbp+0.01 and 1000
with selection set to all selections and execute once per selection, but it doesn't seem to be working, so I'm doing something wrong.

Any help greatly appreciated.

Thanks !

  • Élite
  • Posts: 4458
  • Karma: +252/-10
  • Gender: Male
*
Re: remembering min/max price per selection
« Reply #1 on: Wed, 21 September, 2011, 14:12 »
hi
you might be able to use or learn from this, trailing stop loss.
http://marketfeederpro.com/solutions/trigger-example/stop-loss/trailing-stop-loss-lay/


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.

  • All members
  • Posts: 90
  • Karma: +3/-0
Re: remembering min/max price per selection
« Reply #2 on: Wed, 21 September, 2011, 15:41 »
Thanks a lot !!! That almost solved it for me.

The only small problem left for me is that when I try to address a selection by "up_market_id_1_back_price", "up_market_id_2_back_price" etc, it gives me the reference to the selection order, and not the selection index.

How should I get the selection index ? Tried up_market_id_s_1_back_price, but that doesn't work.

  • Élite
  • Posts: 4458
  • Karma: +252/-10
  • Gender: Male
*
Re: remembering min/max price per selection
« Reply #3 on: Wed, 21 September, 2011, 16:04 »
hi
i am not sure what your up stands for, but if you use
s_3_market_id_back_price
this will give the back odds for the 3rd index.
so you would try
s_3_up_market_id_back_price

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.

  • All members
  • Posts: 90
  • Karma: +3/-0
Re: remembering min/max price per selection
« Reply #4 on: Wed, 21 September, 2011, 16:06 »
Maybe I should rephrase it a bit.

Does the remember trigger remember selections by its sel_index or sel_order ?

Reason I'm asking is that by viewing the variables it shows it by order, but if internally it does it by index than its fine for me.

Thanks

  • All members
  • Posts: 90
  • Karma: +3/-0
Re: remembering min/max price per selection
« Reply #5 on: Wed, 21 September, 2011, 16:08 »
Duh, thanks a lot you wizard  :)

  • All members
  • Posts: 90
  • Karma: +3/-0
Re: remembering min/max price per selection
« Reply #6 on: Wed, 21 September, 2011, 17:45 »
Bummer, still doesn't work how I want it to.

Attached the trigger. If anyone can help me it would be great.

I want to remember the minimum lay price and maximum back price per selection.
In the trigger there's a user variable minlp/maxbp that does just that but that's only for the favorite.

The up_market_id and down_market_id just keep changing their values to the actual back/lay price, so I'm still doing something wrong.

Thanks !

  • Élite
  • Posts: 4458
  • Karma: +252/-10
  • Gender: Male
*
Re: remembering min/max price per selection
« Reply #7 on: Wed, 21 September, 2011, 18:21 »
hi
sorry, but i think that you are trying to make this more technical than is needed.
if you want to use any favs max back price or min lay price.
then just use maxbp or minlp etc as a condition
the maxbp will record the maximum back price for each selection
the minlp will record the minimum lay price for each selection
so if you want to lay the 2nd fav if the fav min lay price was x odds, then
trigger expresion r_1_minlp  is equal or less than x odds etc

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.