| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Help with coding, orders history total https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5861 |
Page 1 of 1 |
| Author: | LittleCaro [ Thu Jun 11, 2020 8:51 am ] |
| Post subject: | Help with coding, orders history total |
Hello guys, I'm trying to filter the trades with the history, so a buy follows a sell, and it works good. But, in the morning when there is no trades, i don't know how to say there's no trades (so the expert could fire a buy or a sell), and i need filtering by magic number. Here is the code i use to find if the previous trade was a buy or a sell (it's working) : Code: Select all Code: Select all |
|
| Author: | SteveHopwood [ Thu Jun 11, 2020 4:19 pm ] |
| Post subject: | Help with coding, orders history total |
I am not sure you have your true and false in the correct order. I am assuming that your call to the function is: if (Isthehistoryclear() ) DoSomething; If not and your call is if (Isthehistoryclear() = false) then reverse my changes. You had a couple of lines of code in the wrong place Code: Select all |
|
| Author: | SteveHopwood [ Thu Jun 11, 2020 7:47 pm ] |
| Post subject: | Help with coding, orders history total |
I forgot to explain why your OrdersTotal() code is incorrect, so here is an addition to my reply. OrdersTotal() is the total of market, stop or limit orders on the platform. You are examining the closed trades in your History tab, so only OrdersHistoryTotal() is relevant here. Keep at it. You will never regret learning to code this stuff. |
|
| Author: | LittleCaro [ Fri Jun 12, 2020 7:19 am ] |
| Post subject: | Help with coding, orders history total |
Thanks for all Steve, It works ok, it's wonderful, i'm learning everyday. Thanks for your generosity. ![]() |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|