beginner make simple errors

Forums ProRealTime English forum General trading discussions beginner make simple errors

Viewing 12 posts - 1 through 12 (of 12 total)
  • #214307

    Hi looking for help on why my strategies work in backtest but not in autotrade – cant find any help anywhere – guess its a schoolboy error  – but what is it?

    #214308

    And to add – Basics are good – manual trading works fine. Strategies running live in Backtest open and close as expected. Autotrading accepts the code OK and strategies are shown as running., but when running at the same time as backtest no positions open.  Turning off the backtest makes no difference, positions do not open in autotrade.  Code is only 100 or so lines and no big loops – running one minute candles with 200 on chart.

    All other details happy to supply – I’m clearly missing something.

    #214312

    What Instrument and what position size are you using?

    You may have < min pos size in your code, lots of us have made that error from time to time.

    OR maybe you set the max setting (when you started your Algo) at less than the pos size that you are using?

    #214313

    Thanks for coming back – I am spread betting the DOW (DJI) at £0.20 per point.

    I don’t have “<min pos size” (or similar) in the code and am not aware that I could have set a max setting.

    Live trade does work OK on DJI at £0.20p

    #214316

    £0.2 per point is okay, this is the minimum.

    You must have set a a max else ProOrder would not let you start an Algo, we can’t leave the setting blank / null.

    Try starting another and you will see the max setting.

    Set max at at least 1 if using 0.2 per point.

    #214318

    ah – apologies – yes I have set a “max position”. It is at £0.20 – this is the field on the form that opens when I active the the strategy for autotrading.  There are other data on the form that perhaps are affecting the service: image attached (hope its big enough to read – not sure how to check) – not sure it uploads – (this is an edit of the message – I have selected the file and it is 112 Kbyte – so good for size) cant see an upload button though – maybe it does maybe it don’t  – sorry

    #214320

    Set the Max setting at 1 and your problems will be solved!

    1 is the MIN setting for the MAX setting! 😀

    #214321

    and a thought – I have the line:-

    BUY 1 PERPOINT AT MARKET

    in the code but set the max at £0.20  – does this cause a conflict perhaps – I thought the “1” meant one contract not “£1” – could that be the isuue do you think?

    #214322

    I am spread betting the DOW (DJI) at £0.20 per point.

    You said above before and now you are saying …

    BUY 1 PERPOINT AT MARKET in the code

    But anyway Yes the Max setting ALWAYS has to be >= the max pos size we use in our code.

     

    #214324

    Many thanks – and we got there quickly too..

    schoolboy error as I thought – I had thought the code bought units and the autotrade form set the price – not so!

    The code sets the price of the position while the autotrade form has recorded a price the code cannot exceed – a wise safety feature.

     

    thanks again folks

    #214342

    Glad you are sorted now.

    Another point you may not know about  … have you enabled your Demo Account on your IG Dashboard under PRT Settings?

    #214348

    Yes thanks – I have been using the demo account but at £1.00p max trade – so no fault occurred!   I looked back at the Programming Guide (ProBacktest and ProOrder) but like before it does seem to say the number in the buy command is the quantity, but I guess this is for shares and contracts.  Spread betting, being different, maybe hasn’t been written up in detail. (e.g. “perpoint” gives me a not found).  Is there a better source of programming guide for spread betting do you know?

     

Viewing 12 posts - 1 through 12 (of 12 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login