End Of Day – YEN M15 Strategy
Forums › ProRealTime English forum › ProOrder support › End Of Day – YEN M15 Strategy
- This topic has 95 replies, 8 voices, and was last updated 1 year ago by ZeroCafeine.
-
-
03/29/2023 at 4:29 PM #212439
- Tks you, I will try your solution after come back home 🙂
03/29/2023 at 5:20 PM #21244103/29/2023 at 5:26 PM #21244203/29/2023 at 6:00 PM #21244503/29/2023 at 7:08 PM #21245203/29/2023 at 7:26 PM #212454long and short pending commands
Pending commands yes, but that cannot result in a long and short trade both onmarket at the same time with a single Algo.
03/29/2023 at 7:34 PM #21245603/29/2023 at 7:36 PM #21245703/29/2023 at 11:24 PM #212464fifi743
hi @fifi743
Can you be a little clearer in what you say, There is a problem of misunderstanding I don’t know if it’s me or you or both of usWhen you say that you can put both functions in the same algorithm, I will answer yes because it is just lines of code, however if the long market function is executed first then the short market function will not be executed as a short but as a sale of the first long position,
According to the documentation it is not possible to be long and short at the same time with the same algorithm, when we talk about being long and short at the same time on a market we talk about Hedging (2 opposite positions)
Or am I wrong ?
Would you perhaps have an example of an algorithm to propose for better understanding?
You can see an image capture with an extract of the documentation in French
03/29/2023 at 11:26 PM #212466Try …
1234567IF onmarket AND newSL > 0 ThenTrailingSL = newSLELSETrailingSL = UndefinedENDIFGraphOnPrice TrailingSL coloured(255,0,0) AS “My Tralling Stop”it doesn’t work, I had also thought of this idea and at the time I thought I had found the solution 🤣 but unfortunately it doesn’t work 😅
03/29/2023 at 11:32 PM #212467but how to don’t draw it when we don’t have a trade open :
123456789// Drawing Trailing StopIF newSL > 0 ThenTrailingSL = newSLIf OnMarket thenGraphOnPrice TrailingSL coloured(255,0,0) AS “My Tralling Stop”endifELSETrailingSL = UndefinedENDIFNote that really “don’t draw” does not exist. Here you see the exit from this morning (in the coffee-spoiling topic 😉 ) and it is depicted by the green line. So this line changes position because I tell it to, but when the position is exited I stop drawing that green line (and more). Now this line keeps on drawing automatically, but while this seems strange, it is even convenient. See 2nd screenshot. You can easily see where this green line was in action, and can zoom in to it when you want. In my case these are the trailing stop exits (the darker green line). Just learn a bit to utilize this feature. You will see it is quite handy.
Your solution doesn’t seem to work, we’re back to the debugging problem, in this particular example I suspect that the last trailing Stop value remains in memory and the program uses it anyway, even if it is undefined
but it’s ok, we will not lose more time for this graph problem, I will start tomorrow to use more option for traling and why not include the short position in the same time and lest do the result
03/30/2023 at 4:10 AM #212469Your solution doesn’t seem to work,
I guarantee you it works. But with the conditions I described. And notice that you asked for not Graphing when Not OnMarket.
The remainder of that code (snippet) does not work at all, obviously. The Undefined also does not work.
03/30/2023 at 4:18 AM #212470When you say that you can put both functions in the same algorithm, I will answer yes because it is just lines of code, however if the long market function is executed first then the short market function will not be executed as a short but as a sale of the first long position,
Try to understand what is happening;
Nothing prevents you from putting a PENDING Limit and Stop order at the same time. If this is not understood, then go to the manual once more and look up how an order like
Buy x Contracts at PriceY Limit
and
SellShort x Contracts at PriceY Stopworks, and while you’re at it, how that would work with manual trading.
If I’d like, I could place 100 (and more) Limit and Stop orders all at the same time. And they would really all be there in Live (or Demo), including their order labels. Whether this is useful, is something else.
It is totally unrelated to having two opposite positions (!) in the system at the same time.
🙂03/30/2023 at 8:04 AM #21248503/30/2023 at 10:02 AM #212516Your solution doesn’t seem to work,
I guarantee you it works. But with the conditions I described. And notice that you asked for not Graphing when Not OnMarket.
The remainder of that code (snippet) does not work at all, obviously. The Undefined also does not work.
Again I misspoke, your solution Works but not in the way I want, (the way I want to is : Not drawing anything when I am not in a position on the market), I understood that it was not possible to do this, So this is clear
-
AuthorPosts
Find exclusive trading pro-tools on