Opening position after 'event'. But no more then once, until next 'event'.

Forums ProRealTime English forum ProOrder support Opening position after 'event'. But no more then once, until next 'event'.

Viewing 4 posts - 1 through 4 (of 4 total)
  • #5814

    Hi fellow ProRealCode users,

    I have been testing and trying stuff for the past month, but cant seem to get the code right for a specific action.

    I want to open a position when the indicators cross over.  , but I don’t want to open a extra position after that. (when first position is closed with profit)   I only want to open again after the indicators crossed over again.

    Something like this in normal words;

    IF c1 but c2 hasent happend yet, don’t BUY 1 CONTRACT AT MARKET.   (<– What I mean is ;  after the c1 happened, and a contract is bought ,  only buy another one , when c2 happened. In the backtest it opens the trade correctly , and closes with a pPROFIT.  But the next candle it opens again , because c1 is still valid. I want c2 to happen first , and then if c1 happens open another trade.)

    Hopefully someone has an idea how to set this up…  Its a guaranteed moneymaking machine… 😉 ;p

    #5831

    Hi AutoTrader,

    Basically, what you want to do here is to test a crossover between 2 values, like moving average.

    ProRealTime has instructions built in to test these conditions, they are called : CROSSES OVER and CROSSES UNDER

    So your c1 and c2 conditions would be:

    I believe that would make it, am I right?

     

    #5845

    Hi Nicolas,

    That is correct!  Thank you!   Made a very simple system that scores 100%  on the 5min Dax cash. (backtest)    Will live test it next week Monday until Friday.

    Thanks for pointing out the crossover!

    #5864

    Share it! 😉

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

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