Using Price Levels to quit the strategy

Forums ProRealTime English forum ProOrder support Using Price Levels to quit the strategy

Tagged: 

Viewing 15 posts - 1 through 15 (of 16 total)
  • #82528

    Hi,

    I did look over the rules for posting but unfortunately I forgot my laptop at the office so wont be able to post code etc. However I was looking for some help on the following issue;

    I am building a system that I want to QUIT once it reaches a certain price level for example on the EUR/USD at 11500

    So I guess my question is how do I input  the price level into the code.

    Would the code below be correct ?

     

    #82531

    Yes, but don’t forget:

    1) IF at the beginning of line 1

    2) . to make price 1.1500

    1 user thanked author for this post.
    #82636

    So when I add the price level to my code the system stops running. I am using the system on the USDJPY. I have tried entering the price level as 11258 and 112.58 but on both occasion the system does not run. As soon as I take out the code with the price constraints the system runs fine.

     

    #82641

    Because while the history is loaded, this condition is met. Try to not load any data when the program start with:

    But it might affect your indicators calculations, I don’t know what are their calculation periods and the timeframe you are using with this trading strategy.

    1 user thanked author for this post.
    #82681

    Hi Nicolas,

     

    I did incorporate the Deparam method and the indicators certainly work when preloadedbars=0. However when I put in certain price levels the system does not run(the system only runs when I put the price level at ridiculously high levels). Which is odd as they are no preloaded bars and the current close[0] on the USDJPY for the backtest is not near the 11258 price level

    Thanks again for your helpful input.

     

     

     

    #82682

    Is they any other way that you can set price levels on PRT ?

     

    #82683

    What TF are you testing on?

    I’ll try it out tomorrow, maybe even now! 🙂

    Also please provide your Indicator … Averages

     

    1 user thanked author for this post.
    #82704

    Hi Grahal,

    Thanks for your input.

    I am using very short averages(two days) and ROC indicator again short periods.

    I am sure to enter appropriate pre-loaded bars before running the machine so indicators get relevant data.

    Look forward to hearing from you.

    Kind Regards,

     

     

    #82705

    Hi Grahal,

     

    I am using the 10 minute timeframe.

    #82706

    To make it easy for me to help you I need code I can paste into my Platform and then start fault finding when / if it doesn’t run.

    I am using very short averages(two days) and ROC indicator again short periods.

    I’m doing other stuff and not got time to try this and that and if I did I may not replicate your code so my time could be wasted?

    So can you post on here the .itf file as this will contain you Indicator Averages (I think?).

     

     

    #82711

    Hi Grahal,

     

    I have actually located the issue and fixed it but thanks for your help.

    #82713

    Hi Grahal,

    I did solve the previous issue is seems I was missing a digit from my price level. However I do have a question that I was hoping you might be able to help me on. Of course given the system the price level will change so is it possible to make the price level a variable so you can alter the level from outside of the code and you don’t have to always have the price-level hard=coded into the machine/system ?

    I have tried to use variable optimisation as you would when creating an indicator but have had no luck ?

     

    #82714

    I was missing a digit from my price level

    Glad you told us, it’s good to close the loop …. thanks.

    I don’t fully understand what you are trying to achieve (the code would help) but in any case I’m not  good at coding, but plenty on here are very very good!

    Could you not use several Price levels hard coded into the strategy combined with a % distance from etc?

    #82779

    ProOrder only use compiled code, so you can’t change the variables set into the code once the program has been pushed into live trading. There is also no external settings available to change value while the program is running.

    1 user thanked author for this post.
    #82918

    Hi Nicolas,

     

    Thanks for the confirmation. One other thing that I wanted to confirm was when your about to run an auto system you are forced to enter a maximum position/stake size.

    Now my system is running a 1.5 stake size(Spread Betting) per pip. Is it possible to have a stake size that is a decimal or do you have to choose a whole number ? For example could you have a stake size of  and put a max bet in of 2.

    Kind Regards,

     

Viewing 15 posts - 1 through 15 (of 16 total)

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