US500 system doesn’t take any trades
Forums › ProRealTime English forum › ProOrder support › US500 system doesn’t take any trades
- This topic has 8 replies, 3 voices, and was last updated 2 years ago by PeterSt.
-
-
02/25/2022 at 9:36 AM #188815
Hello, I’m testing this sysetm on DJ and SP500. It takes frequent trades on DJ, but none on the SP500 (1euro/point). When I plot the Signals for SP500 on an indicator (screenshot below), I can see multiple Signals over the last few days, but no trades. I’m with IG… Orders are AT MARKET so it should work… Is there something linked to the broker settings? Position size, etc.
Any clue on what’s wrong please?
Thanks
US500 not working123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117-------------------------------------------------------------------------// Code principal : 220225 SwingLine LMA//-------------------------------------------------------------------------DEFPARAM CUMULATEORDERS = FALSEONCE PTK = 3.0ONCE SL = 0.3ONCE STB = 24.0ONCE TP = 1.7ONCE periodLMA = 44.0TIMEFRAME(1 hour)//PRC_SwingLine Ron Black | indicatorif upsw=1 thenif high>hH thenhH=highendifif low>hL thenhL=lowendifif high<hL thenupsw=0lL=lowlH=highendifendifif upsw=0 thenif low<lL thenlL=lowendifif high<lH thenlH=highendifif low>lH thenupsw=1hH=highhL=lowendifendifif upsw=1 thenswingline=hLelseswingline=lHendifLMA=2*weightedaverage[periodLMA](close)-average[periodLMA](close)SmoothLMA=weightedaverage[periodLMA](LMA)Long=0Short=0Long = close>open and close>close[1] and close>open[1] and close>hL and hL>hL[1] and close>LMA and LMA>LMA[1]Short = close<open and close<close[1] and close<open[1] and close<lH and lH<lH[1] and close<LMA and LMA<LMA[1]TIMEFRAME(DEFAULT)nLots = round((2000+STRATEGYPROFIT)/(close*.5*.1),1)//round(33031/4258,1)IF NOT LongOnMarket AND Long THENBUY nLots CONTRACTS AT MARKETENDIFIF NOT ShortOnMarket AND Short THENSELLSHORT nLots CONTRACTS AT MARKETENDIF// Conditions pour fermer une position acheteuseIf LongOnMarket AND Short THENSELL AT MARKETSELLSHORT nLots CONTRACTS AT MARKETENDIFIF ShortOnMarket AND Long THENEXITSHORT AT MARKETBUY nLots CONTRACTS AT MARKETENDIF// Stops et objectifs : entrez vos stops et vos objectifs iciSET STOP %LOSS SLSET TARGET %PROFIT TP///2 BREAKEAVEN///////////once breakeaven = 1//1 on - 0 off//STB = 30//how much pips/points in gain to activate the breakeven function?//PTK = 5 //how much pips/points to keep in profit above of below our entry price when the breakeven is activated (beware of spread)startBreakeven = STBPointsToKeep = PTKDistance = 2.5//reset the breakevenLevel when no trade are on marketif breakeaven>0 thenIF NOT ONMARKET THENbreakevenLevel=0ENDIF// --- BUY SIDE ---//test if the price have moved favourably of "startBreakeven" points alreadyIF LONGONMARKET AND close-positionprice>=startBreakeven*pipsize THEN//calculate the breakevenLevelbreakevenLevel = positionprice+PointsToKeep*pipsizeENDIF//place the new stop orders on market at breakevenLevelIF breakevenLevel>0 THENSELL AT (breakevenLevel-distance) STOPENDIF// --- end of BUY SIDE ---IF SHORTONMARKET AND positionprice-close>startBreakeven*pipsize THEN//calculate the breakevenLevelbreakevenLevel = positionprice-PointsToKeep*pipsizeENDIF//place the new stop orders on market at breakevenLevelIF breakevenLevel>0 THENEXITSHORT AT (breakevenLevel+distance) STOPENDIFendif02/25/2022 at 10:07 AM #18881702/25/2022 at 10:25 AM #18881803/01/2022 at 8:18 AM #189104For those who have the same problem… The issue is with the value per point.
With IG France, we have US 500 at 1eur/point, $50/point and $250/point. The Algos don’t seem to work on the first category (1eur/point), irrespective of the number of contracts. I tested on $50 and $250 and it works.
03/01/2022 at 8:42 AM #18911103/01/2022 at 8:46 AM #189113But yesterday I noticed that the 1 is somewhat harder to find ?
And the 1 is the one giving me the 500 error when backtesting with 1M history ??
(on your “Array” system, Khaled, with or without arrays)03/01/2022 at 8:46 AM #189114Hi Peter, for 1 eur/contract, I tried two options:
- variable lot size : (2000+strategyprofit)/(close*.5*.1) –> 8 lots and more
- fixed at 10 contracts
and both don’t work at 1eur/contract. However, same Algo, works with $50 and $250.
with IG France, there is no 5eur/point.
03/01/2022 at 8:58 AM #189116Maybe IG is limiting data access on 1eur/pp because not profitable for them.
For the $50/pp contract, the min lot size allowed by IG France is 0.2.
Let’s say, you want to trade with 5000euros with US 500 price at 4400.
- 1eur/pp, you can trade 5000/(4400*.5*.1) = 22.7 lots
- $50/pp, you can trade 5000/(4400*.5*.1*50) = 0.45 lots (higher than the min of 0.2)
So the min required deposit to trade US500 with Algo is $2200 (4400*$50*.5*.1*.2), equivalent to 1964 euros
We can still trade US500 at 1eur/pp manually
03/01/2022 at 9:12 AM #189118Couldn’t it be related to the slippage somehow ?
I merely refer to a psychological thing, where with manual trading we would be able to directly see what we lose at the exit because of that, while with AutoTrading you wouldn’t understand a hoot of it, afterwards.
Otoh, not sure how the slippage would be different with higher values (more contracts).Maybe IG is limiting data access on 1eur/pp because not profitable for them.
How can anything not be profitable when earning by the spread ? If it is payed by commission (where there’s a threshold) then alas.
Still there could be something like too much overhead (exchange etc. needs to be payed). But not with AutoTrade only …… learning learning learning …
-
AuthorPosts
Find exclusive trading pro-tools on