Issue with n perpoint in subsequent order

Forums ProRealTime English forum ProRealTime platform support Issue with n perpoint in subsequent order

Viewing 7 posts - 1 through 7 (of 7 total)
  • #8425

    Hi Peeps,

    I have been trying to get this to work but I’m not having any success…

     

    When I run this – in the Orders List – I get an initial Trade of 2 perpoint followed by 1 perpoint ( IG Index is a minimum of 2 ) – so this order will not be executed.

    I’m slightly confused why it isn’t accepting the “2” as opposed to “1”  and where it is referencing “1” from

     

    ** Also when I go to – Auto Trade this it tells me

    “The following changes must be applied before sending the code to pro order trading systems with orders that partially close a position cannot be sent to project for example cell-free shares at market make sure that no quantity is specified in the instructions to close positions brackets in this case the instruction closest in tile position) example sell at market return X it short at 1.5 limits ”

    I’ve tried all various coding terms and it’s still sending me this notice.

    Many thanks for any suggestions..

    Regards

    Hugh

    #8441

    I’m sorry, but the code you are using is wrong, and it is my fault 🙁 Because this code came from the documentation, I changed it recently into the TRADEINDEX term page but not in the TRADEPRICE one which share this same code example.

    To add orders when there is already 5 bars elapsed, the code should be this one :

    For the “perpoint” problem, if you change the “perpoint” with “share”, does the problem still exist?

    It is not possible to partially close an order, so I believe you try to do it in your code, that’s why you get this error message. For example, if you BUY 2 SHARES somewhere in your code, then you can’t SELL 1 SHARE elsewhere, if you want to close your buy orders, you must use SELL AT MARKET (all orders will be closed instead of fractionnal one which is not possible).

     

    #8448

    Hi Nicolas

    Thank you for your sterling work.

    I’ve edited the coding as follows:

    At the moment it appears I’m not getting the subsequent order to the initial order.

    Picture attached.

    Regards

    Hugh

    p.s. going to try to replace per point with contract ………….

    #8485

    Ok, so what you want to do here is averaging down your first order? Buying lower than your initial buy order.

    If the answer is yes there is a wrong calculation here:

    This should be:

    Also, you should convert your “10” points value to the instrument point value accordingly and to be “universal” with any instrument:

     

    #8507

    Hi Nicolas

    – Thank you.

    You are a font of knowledge.

    I’ll make some amendments later & confirm.

    Regards

    Hugh

    #9146

    Hi

    Using 1 Min Chart

    I was trying to do this code so that after the first order it will only repeat the order if the price has moved lower/higher .

    (Averaging up or down as per Nicolas’s message)

    I keep getting a warning sign – code not working as per picture

    #9149

    Think I got it work now…….

    IF c1 AND NOT LongOnMarket THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF

    IF C1 AND TRADEPRICE(1)- Close>25 AND LongOnMarket THEN
    BUY 2 PERPOINT AT MARKET
    ENDIF

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

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