profit reduces by 33%
Forums › ProRealTime English forum › ProOrder support › profit reduces by 33%
- This topic has 39 replies, 6 voices, and was last updated 5 years ago by GraHal.
-
-
05/03/2018 at 12:56 AM #69676
It seems to be working….. almost correctly!
Yes, you have the same reference to 30 in both lines 9 and 13, so should X be equal to 30 both IFs will be executed thus making line 10 superfluous. I suggest that you either replace 30 in line 9 with 29 OR 30 in line 13 with 31.
05/03/2018 at 7:13 PM #69747Code works well for
defparam cumulateorders = false
if I want run the same code
defparam cumulateorders = TRUE
what changed I need to make to single order code to make it multiple orders, I am running this on IG UK spread betting account
05/03/2018 at 7:25 PM #69750I never used more than one order per strategy.
What I know for sure is that there is ONE single SL and TP for each strategy, so if you accumalate contracts you have to set them only once. Also, no partial closing is allowed as of the current version of ProOrder, so all contracts need to be sold at one time, no matter whether you bought them at different times.
I cannot tell you more about this, but according to what I said above, I think you don’t have to change anything since you have ONE trailing stop.
05/07/2018 at 8:54 PM #69973PRT really worrying
it worked on demo on live placed plenty of unwanted orders
prd clode1234567891011121314151617181920212223242526Set stop loss 36ret=.5ret1=.75ret2=.8IF Not OnMarket THENy = 0ENDIFIF LongOnMarket AND close > (TradePrice + (y * pipsize)) THENx = (close - tradeprice) / pipsize //convert price to pipsIF x >= 15 and x<=20 THEN //go ahead only if 30+ pipsy = max(x * ret, y) //y = 66.6% of max profitENDIFIF x >= 20.1 and x<=100 THEN //go ahead only if 30+ pipsy = max(x * ret1, y) //y = 66.6% of max profitENDIFIF x >= 101 and x<=200 THEN //go ahead only if 30+ pipsy = max(x * ret2, y) //y = 66.6% of max profitENDIFENDIFIF y THEN //Place pending LIMIT (not STOP) order when y>0SELL AT Tradeprice + (y * pipsize) stop //convert pips to priceENDIF05/07/2018 at 11:11 PM #69977If you post the whole strategy I’ll take a look at it.
05/09/2018 at 5:31 PM #70091I ran the following code. I expect the system should stop out either 99 GBP loss or 90 GBP minimum profit or more
results attached ( why the system stopped out 49.8 gbp loss)
code1234567891011121314151617181920212223242526272829303132333435//-------------------------------------------------------------------------// Main code : 3secsell(2)//-------------------------------------------------------------------------defparam cumulateorders = falseDEFPARAM Preloadbars = 2000DEFPARAM flatafter = 205900//startBreakeven = y//how much pips/points in gain to activate the breakeven function?//PointsToKeep = x//how much pips/points to keep in profit above of below our entry price when the breakeven is activated (beware of spread)ctime1 = time > 161500 and time < 162500x=2IF not onmarket and ctime1 THENsellshort .5 perpoint at marketENDIFSet stop loss 99ret=.1IF Not OnMarket THENy = 0ENDIFIF shortonMarket AND close < (TradePrice - (y * pipsize)) THENx = (tradeprice-close) / pipsize //convert price to pipsIF x >=98 then//go ahead only if 30+ pipsy = max(x * ret, y) //y = 66.6% of max profitENDIFENDIFIF y THEN //Place pending LIMIT (not STOP) order when y>0exitshort AT Tradeprice - (y * pipsize) stop //convert pips to priceENDIFSet stop loss 9905/09/2018 at 5:37 PM #70093DEFPARAM flatafter = 205900
What time was the system stopped out 49.8 gbp loss??
05/09/2018 at 5:41 PM #7009505/09/2018 at 6:02 PM #7009805/09/2018 at 6:05 PM #70099 -
AuthorPosts
Find exclusive trading pro-tools on