Automatic trading last price
Forums › ProRealTime English forum › ProOrder support › Automatic trading last price
- This topic has 8 replies, 4 voices, and was last updated 2 years ago by robertogozzi.
-
-
03/03/2022 at 10:38 AM #189228
Hi, I want to buy at market immediately as the live price crosses above the prior bar high.
Sounds simple but when I use
If Close crosses over high [1] then buy position at market ….. the system waits until the current bar closes and then validates the command… I want the order to launch immediately as price moves above the prior high
Can you guys help please…what is the correct coding word to get the system to send the order immediately as the live price goes above the high of the prior bar ?
thank you
03/03/2022 at 12:42 PM #189240You can place a STOP pending order:
1BUY 1 Contract AT high STOP03/03/2022 at 12:51 PM #18924203/03/2022 at 1:02 PM #189246I think he used [1] because he had to wait for the next bar to close before entering at Market. With a pending order, instead, he can place the order on the same bar whose HIGH is to expected be later crossed (while the next candle is forming).
03/03/2022 at 1:06 PM #18924703/03/2022 at 1:23 PM #189248Apologies, it is still not working…the current bar goes above the prior bar’s high…but does not send any order..It just waits for the bar to close…then it sends the order..I want the system to send the market order immediately .
is this possible? thank you
my simple code is below
// Conditions to enter long positions
indicator1 = close crosses over high[1]IF indicator1 THEN
BUY 10 PERPOINT AT high [1] stopENDIF
SET TARGET PROFIT 10
SET STOP PLOSS 1003/03/2022 at 1:45 PM #189250Hi MnA, this could partly be a matter of how to judge what happens really. I mean, if I look at your screenshot in your last post, it seems to show what you want to happen. So without further context, would you agree that it shows all right (in a static picture) ?
OK, maybe I just don’t get it (I *do* understand what you want to happen) … the blue line, including the little green triangle, shows fine – at the correct place. But where is that next bar of which you say that only “there” the trade happens ?
Or did you draw this with MSPaint and does it only show what you want to happen ?
03/03/2022 at 2:07 PM #189254Hi , the static image was to show what should happen… so… on current bar.. as it is forming…Buy at blue line (which is above the prior’s bar high).
But the code seems to only send the order once the current bar closes not as it is forming ?… sorry Im confused.
Thank you03/03/2022 at 3:07 PM #189262You cannot enter with a STOP order AFTER high[1] is crossed over.
Use a LIMIT order, instead.
-
AuthorPosts
Find exclusive trading pro-tools on