| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Chart into alphabetic order script https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5150 |
Page 2 of 2 |
| Author: | renexxxx [ Fri Mar 09, 2018 12:14 am ] |
| Post subject: | Chart into alphabetic order script |
I have no idea what you are talking about. I have tried to recreate the problem --- I failed. It worries me if someone says that my code works "a little bit". As if it would make up its own mind whether it will work today or not. There is no such thing. I would like to get an example of a set-file, where it only works "a little bit". |
|
| Author: | SteveHopwood [ Fri Mar 09, 2018 12:47 am ] |
| Post subject: | Chart into alphabetic order script |
Most of us will settle for your code working 'a little bit'. It does tend to work magnificently all of the time. You get my message? |
|
| Author: | renexxxx [ Fri Mar 09, 2018 1:21 am ] |
| Post subject: | Chart into alphabetic order script |
Thanks Steve for your vote of confidence! Despite that, I did find a little problem in the code (which by the way has nothing to do with the problem reported by Schmurex, as he/she wanted the symbols on IncludeSymbols not to be sorted). The problem was with the sorting. Turns out that MQL4 built-in function ArraySort() can not sort string-arrays (only numeric ones). So, I have created an new version of ArraySort(), called myArraySort() that can hopefully sort an array of any singular type (i.e. that excludes STRUCTs and CLASSes): Code: Select all |
|
| Author: | SteveHopwood [ Fri Mar 09, 2018 5:54 pm ] |
| Post subject: | Chart into alphabetic order script |
A Bubble sort. This takes me right back to the start of my programming in 1984. I used the proceeds from a huge concerto performance to buy my first computer and printer - a few quid short of £1,000. It was a BBC 'B' - there will be a few oldies nodding nostalgically right now. 32K (yes, "K") of RAM and programmed in the low level language BBC Basic. This did not compile and so each command had to be translated into machine code every time it was operated. Code was stored on a cassette recorder - it was a year before the first external disk drive became available - 5.5 inch floppy. There were no inbuilt sorting functions, so a hand-crafted Bubble sort was the only one available. The thing was so slow that a database of c.30 records would take 5 minutes to sort. Happy days. |
|
| Author: | schmurex [ Fri Mar 09, 2018 8:44 pm ] |
| Post subject: | Chart into alphabetic order script |
Hi Renexxxx, Sorry for my late reply, I just found yours. I didn't mean to offense you, as I highly respect you as a coder and a member of this community. I tried many times and got each time a different result, always differing to some extend from the list: most of the times misplaced pairs, sometime simply missing pairs. I believe that it's not a problem of code but a problem with Empty4 when it has to deal with too many charts. I tried on 2 different computers both with Windows 10, one with Global Prime, the other one with FxPro. Some of the indexes as well as the metals have different name in different platforms. Here are 2 Set files. |
|
| Author: | renexxxx [ Fri Mar 09, 2018 9:13 pm ] |
| Post subject: | Chart into alphabetic order script |
Don't worry about offending me ... I have tried your GP set file on my GP platform and the charts are opened in exactly the same order as specified in the set file. I have not tried the FX Pro set file, as I don't have a FX Pro terminal. I give up and I declare this discussion now closed. It doesn't add anything to the forum. You have to sort out your problem as it is clearly on your end. |
|
| Author: | schmurex [ Fri Mar 09, 2018 9:24 pm ] |
| Post subject: | Chart into alphabetic order script |
I completely agree with you. No problem at all. Thanks again |
|
| Author: | renexxxx [ Sat Mar 10, 2018 2:42 am ] |
| Post subject: | Chart into alphabetic order script |
Yes, bubble sort is not the most efficient sorting algorithm. In the attached script, I compare the time it takes to sort a 50000 element doubles array via bubble sort and quick sort. The difference in time is astounding! For those interested: normally quicksort is implemented recursively. However, on Empty4 this gives a stack overflow (for reasonably sized arrays). Therefore, I've implemented an iterative version of quicksort. This is just for fun ... doesn't make any money! |
|
| Author: | 1000pips [ Sat Oct 06, 2018 10:44 am ] |
| Post subject: | Chart into alphabetic order script |
:youknow: Hi Renexx, thank you for the script. Doing semi automated trading & was wondering is there a script for copying line values with tags into values transferable into excel like {PAIR, EASYORDER_Price, EASYORDER_SL. EASYORDER_TP, TP2} as comma separated values that you copy from the open script window & manually transfer all at once into excel, as long as you assign the tags of the line prices you want the script to copy. I am trade sizing in Excel the manual way. Thank you for your assistance. |
|
| All times are UTC | Page 2 of 2 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|