HELP for enter a long position if its under the average

Forums ProRealTime English forum ProOrder support HELP for enter a long position if its under the average

Viewing 6 posts - 1 through 6 (of 6 total)
  • #40082

    Hey fellow coding humans,

    Im new to this and have stumbled across a problem i need help with.

    Im trying to simply tell my system that i dont want it to enter a long position if its under the average (110)

    heres and extract from my code:

     

    upbox and downbox  are defined params.   I have tried everything to try to stop it from placing LONG positions under the average (110) e.g. ELSIF upbox + downbox<mo THEN etc.

    it is still buying long positions.

    what am i doing wrong?

    many thanks lovely people.

     

    #40202

    Please provide the full code of your strategy as I don’t know what values are stored into your upbox+boxsize variables.

     

    #40256

    Instead of not entering if under MA(110) why not have a condition added to your other Long entry conditions …

    Or have I missed the point?? 🙂

     

    #40263

    I second Grahal in this one. 😉

    1 user thanked author for this post.
    #40568

    Great many thanks guys. That really helped. Ive sorted it now.

    Just another question about the mechanics of automated trading if i may?

    I have written a multiple moving average crossover strategy for the hourly USD/JPY which returns over 100% a year. If i then apply this to the EUR/GBP it losses money.

    Is this because i have been writing / altering the code to suit the backtesting of  the USD/JPY? And do i need to get the code working well on all pairs before implementing? Or is this normal that these types of strategy suit some pairs more than others?

     

    many thanks

    #40598

    You asked … is this normal that these types of strategy suit some pairs more than others? … Yes, but usually it’s due to the value of the variables have been optimised for a particular forex pair etc.

    You said … which returns over 100% a year … you sure you have the ‘tick mode box’ enabled as this sounds too good to be true?

    Make sure you run in Demo for weeks / months before you go Live and maybe lose your hard earned money??

     

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

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