| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Crude trend ID code and the order counter... https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4439 |
Page 1 of 1 |
| Author: | Jexodus [ Mon Oct 05, 2015 12:40 pm ] |
| Post subject: | Crude trend ID code and the order counter... |
Ok, I've searched around for how to effectively code to identify trend and haven't found anything that i went "Yes! I understand that!". I even looked through the code for trend based systems (like Pipmasher) to try and extract how it was done. Not finding my answer, i resorted to MSU (Making Sh!t Up) and coded a really crude version of trend ID. Funnily enough, it seems to be working pretty well (although no perfect). Basically, I took a 240MA (user adjustable), took three samples of it and compared the values. Code looks like this (please hold the laughter...): Code: Select all The other issue I have is that I've put in a max order limit for my EA which simply gets OrdersTotal() which is assigned to a variable, and compares it to a user input. This is one of two (one for long, one for short): Code: Select all Thanks in advance to the coding gurus for any help provided. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|