Exit on the close of the candle

Forums ProRealTime English forum ProBuilder support Exit on the close of the candle

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

    HI All

     

    I am looking for simple code to exit the trade when weekly signal close?

    The strategy i am working on is using weekly signals which enters the trade if weekly candle from previous week closed above SMA5  and exit that trade at the end of the week (i.e. Friday close of market).

    so in the strategy how do i write the code to close the trade at the end of Friday ?

     

    Thanks in Advance.

     

    #229135

    This only works via MTF in a smaller time frame.

    #229174

    Good morning. First you have to define the indicators in the weekly timeframe and then go down to a timeframe lower than the daily one so that it allows you to close before the market closes. For example, if you use a 1H timeframe then you can close the position on Friday at 21:00. It would be something like this:

    1 user thanked author for this post.
    #229296

    Ivan

    why is the time frame used 21000 or 20000 ? what does 3pm means ? as currently code sell stock at 4pm in Australia time which is basically not the best time to sell stock and i want to set it as 3pm then what will be time value ?

    #229307

    Hi!
    Sorry… I wrote the code for Europe…
    In Spain NYSE ends at 22:00, so that’s why I wrote 21:00. In Australia you should write the correct time.
    You just need to change time and it will work.

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