I am using IG and PRT. I have about 7 simple strategies running in Pro Order recently and they have not generated any trade or open any position – there is a rejection “order rejected by the broker” WHY? Am I not deploying the scripts to Pro Order correctly?
JSParticipant
Senior
Hi @micquan
So there are orders generated by your systems but they are rejected by the broker (IG).
This can have several causes:
Wrong limit order prices
Minimum stopping distance too small
Margin insufficient
Etc.
Or maybe your position size is below the minimum for the Instrument you are trading?
there is a rejection “order rejected by the broker”
Only one??
So maybe, in the other 6 strategies, the Buy / SellShort conditions have not occured?
Currently, I am testing the prt / ig system and integration, as well as operational testing before I do further development. The code are very simple, see below. For the Grid Trading strategy, set the entry prices 19$, go long and exit when the profit is above or equal to 10%. The minimum number of contracts/points is 100 points. This script was rejected. Also, why are these scripts ONLY get invoked at 19:00 hours, see attachment.
// Definition of code parameters
DEFPARAM CumulateOrders = False // Cumulating positions deactivated
// Conditions to enter long positions
c1 = (close >= 19)
c2 = (close < 19.50)
c3 = (close >= 19.50 )
c4 = (close < 20)
c5 = (close >= 20)
c6 = (close < 20.50)
IF (c1 AND c2) OR (c3 AND c4) OR (c5 AND c6) THEN
BUY 100 PERPOINT AT MARKET
ENDIF
// Stops and targets
SET STOP %LOSS 50
SET TARGET %PROFIT 10
You serious about this … I needed funds of £1,000,000 to get the strategy to run and then to only make £1K in 8 months??
Do you get same as me … see attached?
JSParticipant
Senior
Hi @micquan
When using this strategy, you must consider that you are trading between two fixed boundaries (grid), in this case a maximum of 20.50 and a minimum of 19.
When your strategy wanted to execute a trade, the VIX was already above 20.50 so it was rejected.
Your time frame is a day and you activated the system January 4th at 18:00
Your first candle closes on January 5 at 18:00 (+ 1 hour time difference) is 19:00.
So, the system tries to make its first trade at 19:00 but it is rejected for the above mentioned reason.
The margin for a 1 euro contract is 20% so total margin for 100 contracts is:
22 x 100 x 20% = 440 euros
JSParticipant
Senior
Also move your Set Stop & Set Target above the last EndIf so that they will only be activated when you actually Buy.
Hi @GraHal, It’s a simple grid trading strategy which I want to develop further. I just started using autotrading tools prt and still have a long way to go before I develop something sensible and useable but I have to start somewhere or nothing at all.
Hi JS, I will try to use the info you provided to improve this strategy and script, and get it to do something. Thanks
Hi GraHal and JS, As said before all my strategies are very simple to get me started learning PRT. This one also got triggered at 19:00 – please explain.
Hi GraHal,
On my system it’s 255k funds on the equity curve and the back test has a gain of 143k over 8 months. See attachment. Am I right or am I missing something? Why is the funds have to be so high?
JSParticipant
Senior
Edit: sorry not really awake yet…
Your indicators are correct only you place a Stop%Loss of 50%
Am I right or am I missing something?
Are you trading Volat Index(DFB)? You are showing 10 Contracts on your backtest.
Even at 10 Contracts, could you sleep at night with the $42,000 Drawdown showing on your results??
$42,000 Drawdown is over 40% of your starting capital of £100,000!
According to my Platform, the minimum position size is 100 Contracts … see attached at red arrowhead.
if you’re just starting out with PRT, I would strongly advise you to stick with the DOW, DAX, SP (US 500) or NASDAQ (US tech 100) as they have the lowest spreads. In % terms, the VIX is over 100x more expensive to trade than the DAX (0.725 vs 0.007), it’s like swimming with a rock tied around your leg.
Some of these ’boutique’ indices may seem sexy but the simple fact is that (generally speaking), all indices do the same thing – they go up and they go down and you’re trying to catch some of that movement. There’s no big magic in trading this one as opposed to that one. Don’t make it more difficult for yourself by starting every trade with an enormous hill to climb just to get past the spread.
There are also certain foundational principles that are worth considering. Your stoploss is 5x higher than your target profit. Very difficult to make that work in the real world. I have never seen a successful algo where the stop was greater than the target. It might be possible, but for me it’s a big red flag. Not to mention that your 50% stop would be quickly ruinous.
More typical (and more sane) would be 1% stop, 2% target (or something like that…)
best of luck!