Get current price and entry price

Forums ProRealTime English forum General trading discussions Get current price and entry price

Viewing 8 posts - 1 through 8 (of 8 total)
  • #177941

    Hi,

    Can anyone please advise who in the code part it is possible to get the market price as I can only see the open, close, high and low price options, but not the market price. Also is it possible to see the entry price? My aim is to do something like this:

    Thanks

    #177945

    Hello,

    I believe strategies are made on close only. To get a market price in between, best would be to lower the timeframe as small as possible (1min etc…)
    Regarding entryprice, you have the instruction POSITIONPRICE

    Fabrice

    #177954

    Close is the market price at any stage during candle formation.

    Close is also the market price at candle close.

    #177955

    What Swingueur  said is correct.

    As to the entry price, TRADEPRICE, or TRADEPRICE(1) (they are equivalent), is the correct answer. It is ALWAYS tha last price traded.

    After entry, TRADEPRICE will retain the entry price, after exit TRADEPRICE will retain the exit price and the entry price will then be retained by TRADEPRICE(2).

    After any operation it is shifted by one place.

     

    1 user thanked author for this post.
    #177972

    Hi GraHal,

    When I use Close, the system only takes into account the close value of the bar. In real life automated trading, I would like the system to monitor the current price, e.g. If I enter a trade in DAX and the price moves by 15 points, I would move my Stop Loss to +2 points, so that in the event of  price turning against me, and not reaching my target of e.g. 30 points, I would not go into loosing trade, but would exit with only 2 points gain. Where as in the backtesting I am unable to tell the system to behave in this manner. This is the code I came up with, but as you can see in the screenshot it is not doing as I am telling it to do.

    The blue line is the entry
    Green line is alert level, i.e. when the price has already moved by 10 points
    Red line, is where the buyback should occur, i.e. if the price has gone to 10 points my way, and then it reaches the 3 point below my entry then sell.

    #177974

    Use MTF support.

    Searching the forum for MTF will return blogs, posts and plenty of code to learn how to use it.

     

    #177984

    Hi robertogozzi,

    Do you know what is the smallest time frame possible?

    I tried running the following code in 1 tick timeframe but the system would not even enter a trade:

     

    #177988

    1 second is the smallest one.

    Non-time based TFs, like ticks, cannot be used for automated trading.

     

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

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