Skip first entry in system

Forums ProRealTime English forum ProOrder support Skip first entry in system

  • This topic has 2 replies, 2 voices, and was last updated 6 years ago by avatarPaul.
Viewing 3 posts - 1 through 3 (of 3 total)
  • #45759

    Hi I ran into a problem with coding. Hopefully someone has an answer for it.

    detector is always -1 or 1

    previous intraday has a short position based on detector -1.

    It has stops attached.

    I cancel the order in the evening to make changes.

    At the opening because detector is still -1 it enters immediately short with different stops.

     

    If I take profit/loss on a position it supposed to re-enter based on detector.

    if not shortonmarket and detector = -1 and (detector[1] = 0 or detector[1] = 1) then

    Only, I want to skip the first entry when a system goes active. Then have always a position based on the next opposite detector 1 or -1.

    Is there a solution for this?

    Thanks,

    Paul

    #46090

    Hi Paul, in order to help you with speed and efficiency, I suggest you to post your code, thank you.

    #46182

    I found that the easiest solution is the best.

    Just close at end of day. That’s preferable.

    Besides use a extra indicator to create a signal so it doesn’t enter at the opening.

    I posted the code in the strategies as it looks interesting.

     

     

     

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

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