Hi, hoping someone can help as fairly new to prorealtime altogether. Need code for spreadbetting. If not familiar this is UK specific e.g. if price of a forex pair is 5508 and you bet £1 long and price goes to 5515 and close position, you would make £7 profit as 7 points x £1.
Essentially i’m trying to write a code to do the following
Limit the loss per trade to £100 (1% of 10,000 capital) with parabolic SAR as a stop loss system
e.g. Enter long trade 5508
parabolic SAR point is at 5500 therefore 8 points away is the initial stop loss
Do not want to risk more than £100, therefore position size is £100/8 = £12.50. Therefore, for example the trade goes to 5515 and you close: thats £12.50 x 7 = £87.50
Would it be possible to code this?
Also when entering trade e.g. long would it be the following?
IF Bullish THEN
BUY PositionSize perpoint at market
ENDIF
Not sure when perpoint vs. contract is relevant. Is there any difference, a specific one for spreadbetting?
Any help would be much apprecited
Regards