Increase and decrease trade amount with profit and loss

Forums ProRealTime English forum ProOrder support Increase and decrease trade amount with profit and loss

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

    So comments welcome, mods for other scenarios, but here I got to thinking about keeping my profits reasonably safe and increasing trade amounts without stopping the program. so below is the code. It works on backtest and sould reduce trade amount based on your profit elvel and setting for tolerance.. Comments and additions welcomed but for me this works well I think.. I’ve yet to backtest with losses but think it should work based on the logic.

     

    #142876

    You will find that if you use an absolute gain it can increase yield and having a Mydiv greater than 2 will limit gains initially but minimise losses if it starts to fail and as it grows good wins/runs can become exponential in meeting absolute gains though thats in backtesting of course. Currently if you apply to the Dax Kama program I’ll have to dig out a link, it turns 9K to 21K with a £15K absolute gain when running from Jan 2019 and then quit the program.

    Any suggestions on resetting the strategyprofit=0 would be appreciated as that could reset the program to restart from scratch after hitting target. If there’s any code snipbit for that be good i.e telling the program to set to strategyprofit=0 for a fresh start without closing the program.

     

    #142886

    Anyone looking I’m adding  a margin tolerance and minimum trade tolerance level which will stop program shutting down if that became a factor but a means of strategy profit resetting or calculating strategy profit to rest be useful. I’ll scour the forum but a pointer be useful if its there

    #142976

    So this is a pic of my initial idea and how it works. I’ve not included the code yet thats been modded as it’s not quite finished owing to tweaking the margin tolerance, and snagging out any scenarious where calculation may stop the program continuing, but it’s looking promising – if needing refinement..

    The idea is that when running well it will increase the trade amount in increments, and when experiencing a loss reduce the trade amount accordingly up to the initial trade amount starting the program. Potentially it could be reduced as well if experiencing too much program drawdown..

    The 100% data in the pic attached highlights the incremental change, and it reduces back to the intial trade amount once it has hit a target amount which I call my absolute gain = myabsgain in the code.

    As a reasonably newby I think its important to optimise potential success of a strategy at startup and put in risk tolerance before quitting, so this is to look to optimise profitable runs and it can be tweaked with the myabsgain, some code, and reduces trade amount accordingly if dropping profits… Not much interest in the idea It seems, so I’ll limit posting unless some interest shown..

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