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 😊
JSParticipant
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…
Hooo, tks you, so need more coffee 😊
how about barindex trade of 508, why the code buy before ?
JSParticipant
Senior
What time do you think corresponds to BarIndex > 508…?
Time frame 15 minutes, 508 * 15 min = 7620 minutes (127 hours)…?
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 ?
JSParticipant
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…
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 ?
JSParticipant
Senior
Hi,
You probably already know this picture, but it is clear about the different types of orders…
@JS
Tks you, I think I understand your pictures tks agin
I always try to understand the perfect execution of my orders