How to "store" Position.EntryPrice
How to "store" Position.EntryPrice
06 Jun 2016, 10:53
Is there a way to get the vertical value (y, price) from a opened Position stored somehow, so I can enter a new Position at the same Price automatically when my criteria are met again?
I tried LastValue.Position.EntryPrice, but that does nothing. And as Long as that code is there no positions get opened any longer.
Replies
jeremy.vostik
06 Jun 2016, 11:47
How exactly do I check it?
The Problem is, that I Need to store that number for later use somehow. Just like index -1; index -2 for example.
I Need the (first) Position entry Price. saved. so that when i open other positions I can still Access that pricelevel.
Wouldn't opening new positions override that number?
Maybe I can do something like
ExecuteMarketOrder(.....yadayada)
double firstEntryPrice = Position.OpenPrice
and for every new Position I create a new double.
Problem there is, what if I have an already manuall opened Position and I run the cBot after that? How do I "call" that open positions OpenPrice?
I would Need to find that open Position first and than extract that Price to a double.
Correct me if I am wrong or if I overcomplicate things :D
@jeremy.vostik
Spotware
07 Jun 2016, 15:05
Dear Trader,
Please have a look at the Positions.FindAll Method.
We hope, it will help you with your query.
@Spotware
... Deleted by UFO ...
belonohy
06 Jun 2016, 11:01
RE:
Open price on "Position" object is not enough?
You can check it anytime...
@belonohy