TradePrice Entry and Exit

Forums ProRealTime English forum ProOrder support TradePrice Entry and Exit

Viewing 5 posts - 1 through 5 (of 5 total)
  • #213258

    Hi

    I read the documentation about the TradePrice function and I do some tests and I realize that the TradePrice function does not make the difference between an entry price and an exit price, is there a solution to remedy this problem?

    For example on the documentation we can use the following code:

    The problem is that if you use a filter to enter a trade after five candles then when you exit a trade you will also have to wait five candles to re-enter.

    Other question: If I have for example a position with five different entries how can I allocate to five different variables (or more) the entry price to be able to use them in the future and reset them once I have exited my position completely (or partially to complicate things further)

    Tks in advance for your light or you links,

    Best Reguards,
    ZeroCafeine

    #213265
    JS

    Hi,

    You can simply use…

    If OnMarket then

    myEntryPrice = TradePrice

    EndIf

    If NOT OnMarket then

    myExitPrice=TradePrice

    EndIf

     

    1 user thanked author for this post.
    #213270

    tks you @JS

    Do you have another idea if you have several inputs and several outputs and you don’t know the total number of trades in advance, also and you to reset them?

    example with 3 entries and 2 exits?

    I have to program something simple and put the code here

    #213313
    JS

    Hi,

    With multiple contracts you can use “CountOfPosition” to find out the total amount of contracts…

    The average position price can be found with “PositionPrice”…

    You can continue to follow the entry/exit price of the individual contracts with “TradePrice”…

    #213452

    now I’m using this :

Viewing 5 posts - 1 through 5 (of 5 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login