Positionsize vs accountcapital
Forums › ProRealTime English forum › ProOrder support › Positionsize vs accountcapital
- This topic has 6 replies, 4 voices, and was last updated 3 years ago by OMXet.
-
-
03/13/2021 at 12:01 PM #163994
Hi
An easy question to you pros;>)
I want to trade positionsize in relation to the growth ( I hope) of my account
like this
V = variabel
positionsize = account/ V * 10.000
this would produce X contracts which I then want reduced to 2 decimals, for instance 2.57 which I suppose is the most decimals PRT accepts?
ex= account 128.527
V = 5
positionsize = 2.57
03/13/2021 at 4:23 PM #164023I don’t know how many decimal digits are allowed in automatic trading. to make sure there are no miore than 2 decimal digits you can write:
123N = close / 10000X = round((N * 100) - 0.5) / 100 //max 2 decimal placesY = round((N * 10) - 0.5) / 10 //max 1 decimal place03/14/2021 at 1:01 PM #164101Hi Roberto
I found this in another tread
12345678STARTINGCAPITAL = 10000 //10k USDSIZE = 1 / STARTINGCAPITAL //divide your initial contract size by startingcapitalCAPITAL = STARTINGCAPITAL + STRATEGYPROFIT //current capitalK = CAPITAL * SIZE //calculate position sizepositionsize=KN = close / 10000X = round((N * 100) - 0.5) / 100//max 2 decimal placesSo this do you think will work?It is answer to the first part of my question above.
Is there anyone here who knows how many decimals IG requires in an automated trading?
03/14/2021 at 2:48 PM #164119OMXet – Please follow the forum rules and always use the ‘Insert PRT Code’ button when posting code. I have tidied up your post.
Probably the best people to ask about how many decimal places IG allow is IG.
Years ago it used to be that only whole numbers were allowed by IG and any orders with decimals were rejected but that definitely changed at some point.
03/14/2021 at 2:52 PM #16412103/14/2021 at 2:54 PM #164122I had an Algo last week showing a position size of 0.93 contracts on the DJI in Demo.
Minimum on the DJI is 0.2 so it looks like above 0.2 to decimal places may be allowed.
You could always ask on the IG Forum
03/14/2021 at 2:56 PM #164123 -
AuthorPosts