Grid orders with one combined stop loss and limit, can it be done?

Forums ProRealTime English forum ProOrder support Grid orders with one combined stop loss and limit, can it be done?

Viewing 15 posts - 16 through 30 (of 307 total)
  • #5723

    Something’s wrong here, you’re right. The average position price minus 1% is 75.626 for your basket of 3 orders this morning and they exited @76.30 at 16:00 …

    Just to be sure: exit is calculated @ average position price minus 1% of this price = average position * 0.99 / are we ok with this?

    On my backtest (screenshot attached), trades are not closed, graph instruction return exactly the ‘newsl’ variable where the trades are supposed to close… Are you sure you don’t have change the multiplier to 0.001 instead of 0.01?

    As for the strategy to shutdown after a loss, we can use STRATEGYPROFIT to achieve this, just change the line2 with this code:

    So the first order will only be launched one time and grid orders are not initiated if there are no other orders on market.

    #5733

    Good morning Nicolas,

    Yes I’m absolutely ok with  exit is calculated @ average position price minus 1% of this price = average position * 0.99.

    It turns out that I had indeed changed the multiplier to 0.001, sorry about the mix up.

    Thanks, I keep on testing today adding the shut down after loss feature 🙂

    #5761

    So for todays update of the real market testing, I changed the 2nd line as above but kept (positionprice*0.01) thinking it’s best to make one change at the time but the system still placed new entry orders after SL with this code;

    No I have changed to 0.99 running it along with the change of the second line, let’t se it it works 🙂

    #5766

    Hmmm I think i know why, change this lines too :

    Because it will open a new trade even if the previous one is closed already … miss that thing sorry 🙂

     

    #5879

    Thanks once again Nicolas. Unfortunately I have not been able to test your latest addition yet since my PRT demo with IG expired a couple of days ago and I’m waiting for IG to allocate my deposit to my account so I should be back on track soon enough, I’ll give a new update in the days to come…

    #6254

    Any update here?

    #6303

    Hello Nicolas,

    Yes finally I got an update! IG had a major delay in allocating my deposit to my account, partly my own fault though, but I got it sorted a couple of days ago and today I set up my demo account again. I have been doing some backtesting this evening with the latest modified code you provided and things look very promising!

    I ran it on a Dax 3 minute chart (hence some entries are not exactly 20 pips when the market moved fast) and all entries were triggered properly and so was the SL. In addition no new entry orders were placed after the SL was triggered 🙂

    This is the code I used;

    Tomorrow I will start the forward testing in real time demo and if looking good I might even try it on my real account though I will watch it very closely if I do.

    So if the current code keep on working as intended there are two additions that I hope we can make;

    • A limit function for taking profit at a given percentage level with a default level of 10 %.
    • A function to bring the SL to break even once a given profit is reached, perhaps 3 %.

    Another general question due to my lack of PRT and coding experience, is it possible to modify a system while it is running in real market conditions? The point would be to manually change SL or limit levels.

    I’ll be back with a new update tomorrow after some forward testing.

    #6307

    Hmm when testing the same code on GBPCAD the SL is not triggered which it should have been at around 1.8300 or a bit lower due to the lower pip value of this pair. Makes no sense to me…

    Please ignore the first pic, I uploaded the wrong one but don’t know how to remove it.

    #6312

    Please use

    To be sure the stoploss price value have been correctly calculated.

     

    #6318

    Another general question due to my lack of PRT and coding experience, is it possible to modify a system while it is running in real market conditions? The point would be to manually change SL or limit levels.

    1. As an IG client you cannot modify a system once it’s running in PRT.
    2. You can only Stop it and there are options in the general settings if you Stop a system should it close positions or leave them open.
    3. If you manually modify a position on the IG platform it will Stop the system but your position will stay open if you only changed the PT/Limit or Stop Loss and then you have to Restart the system in PRT  it will state user intervention stopped the system.

    I assume the reason for this is if there’s a bug that’s not in your system but a bug with PRT, PRT can test for it as they did for one of my systems that started opening positions until it hit the PRT 50 positions per day per system limit.

    #6322

    Because programs are running server side, it must be stop there before you can make modifications on the program. That’s the reason why PRT always want you to “prepare” the code, before it can be launched in their servers.

    #6355

    Thanks guys, that makes perfect sense, I figured it’s not possible but doesn’t hurt to ask. Being able to modify the positions on IG and maintain them open even if the system is stopped it a great benefit to change the SL to lock in profit or raise the limit after building up large positions and price takes off in the right direction after news announcements.

    Today I have been testing in real market conditions on demo and things look very good, entry orders are taken is intended with small differences which can probably be adjusted by changing to a second or tick chart from the 1 minute chart. I started the system on Dax, EURJPY and GBPCAD this morning taking 3, 4 and 3 entries accordingly, I’m hoping Dax will turn down during the evening or tomorrow to see if the SL works properly.

    Nicolas, could you possibly provide a code for short positions too please? I tried reversing one of the long codes earlier on but never managed to make it work properly I’m afraid.

    New updates to come tomorrow or the next day.

    #6358

    Sure I can do it. This grid orders code is a nice example for everyone.

    Maybe you could describe for us all how you are using it in your trading plan? It surely be in interest for a lot of people around here! 🙂

     

    #6423

    Hi fellows it’s been a long day and getting late so I’ll keep this update bried but I will tell you more about my strategy and trading plan tomorrow 🙂

    Today’s performance has been bad news since Dax dropped as expected but the SL was not triggerd and drawdown went over -5 %. This is the code currently running;

    Nicolas, do you have any idea why the SL was not triggered?

    #6438

    Before I change anything on code. You are talking about drawdown, but drawdown about what precisely? In the current code, we are not testing money account at all, only the spread between the average open price of the whole positions and the current close of the instrument.

    Since I don’t have informations about your 3 still opened trades, I don’t have any idea about where is the price stoploss computed by the program itself 🙂

Viewing 15 posts - 16 through 30 (of 307 total)

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