Buy 1 Shares AT 133.133 Limit Not working

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #212692 quote
    ZeroCafeine
    Participant
    Senior

    hi

    I’m testing buy one share at limit price but it’s still not working, what I’m missing ? maybe need more coffee 😅

    Defparam cumulateorders = false
     
    // LONGS & SHORTS
    IF BarIndex > 508 THEN
    Buy 1 Shares AT 133.133 Limit
    ENDIF
    
    IF LongOnMarket Then
    Set Stop pLoss 12
    ENDIF

    – I want to buy only after BarIndex > 508 : why not working ?
    – I want to buy at 133.133 JPY : the program buy at 130.xxx JPY, Why ?

    Tks in advance for all your light 😊

    Capture-decran-2023-04-03-a-06.20.41.png Capture-decran-2023-04-03-a-06.20.41.png
    #212694 quote
    JS
    Participant
    Senior

    The market price on March 24 at 20:00 was 130,719…

    You want to buy now (Buy Limit 133.133) ABOVE the market price, so your Limit order turns into a Market order, and you buy for 130,731…

    Buy Limit always BELOW the market price…

    ZeroCafeine thanked this post
    #212695 quote
    ZeroCafeine
    Participant
    Senior
    Hooo, tks you, so need more coffee 😊 how about barindex trade of 508, why the code buy before ?
    #212699 quote
    JS
    Participant
    Senior
    What time do you think corresponds to BarIndex > 508…? Time frame 15 minutes, 508 * 15 min = 7620 minutes (127 hours)…?
    ZeroCafeine thanked this post
    #212701 quote
    ZeroCafeine
    Participant
    Senior
    What time do you think corresponds to BarIndex > 508…? Time frame 15 minutes, 508 * 15 min = 7620 minutes (127 hours)…?
    Ok ok, may I answer my self and say the buy fonction it’s not compatible with BarIndex ?
    #212703 quote
    JS
    Participant
    Senior
    You can use the BarIndex but for example in this way: If IntraDayBarIndex = 10 then Buy 1 contract at Market EndIf The “IntraDayBarIndex” resets itself every day so every day you buy when this BarIndex is equal to 10…
    ZeroCafeine thanked this post
    #212774 quote
    ZeroCafeine
    Participant
    Senior
    You want to buy now (Buy Limit 133.133) ABOVE the market price, so your Limit order turns into a Market order, and you buy for 130,731…
    Tks you, so maybe this picture can resume the buy order, tell me if I m wrong pls ?
    SmartSelect_20230404_112032_Samsung-Notes.jpg SmartSelect_20230404_112032_Samsung-Notes.jpg
    #212809 quote
    JS
    Participant
    Senior

    Hi,

    You probably already know this picture, but it is clear about the different types of orders…

    Stop-Limit.jpeg Stop-Limit.jpeg
    #213064 quote
    ZeroCafeine
    Participant
    Senior
    @JS Tks you, I think I understand your pictures tks agin   I always try to understand the perfect execution of my orders
Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.

Buy 1 Shares AT 133.133 Limit Not working


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 8 replies,
has 2 voices, and was last updated by ZeroCafeine
2 years, 10 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/03/2023
Status: Active
Attachments: 3 files
Logo Logo
Loading...