| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Steve's first programing lesson https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4048 |
Page 1 of 1 |
| Author: | Mike [ Wed Jan 14, 2015 5:35 pm ] |
| Post subject: | Steve's first programing lesson |
Some of you might have followed Steve's invitation to try to modify his script "Market long" at the beginning of their programming career. Thanks for the detailed description. I try to trade with Scripts but sometimes I forget I have them on or imagine they are still on. Since I forget faster than I imagine, I would like to see on the chart a note "....", that remembers me: the script is running. Ok I got the script to do this (see attachment) Now - as you see appetite grows - I would like three different options and do not know how to accomplish them: Option 1. after the script has done its job, the note disappears Option 2. after the script has done its job, the note changes to: "job done" Option 3. the script does not disappear, when I change TF. I understand that Scripts are programs that are intended to perform a single action: a Script stops functioning once it has completed its function one time. Does option 1 define one action, because they happen simultaneously or are they distinct single actions, which cannot be programmed as a Script? Same question for option 2. Option 3 is from what I understand not possible, but I'm not sure. Thanks for your help, Mike |
|
| Author: | SteveHopwood [ Wed Jan 14, 2015 11:44 pm ] |
| Post subject: | Steve's first programing lesson |
Great to see you getting your hands dirty. You put Code: Select all You put Code: Select all Cannot be done. Actually it can, but then you are getting into endless loops and treating a script rather more like an EA - and you really don't want to go there until you know what you are doing. For now, just accept that a script is a run-once thingy. Have fun. You are starting out just like I did 8 years ago, and look where I am now. |
|
| Author: | Mike [ Thu Jan 15, 2015 8:19 am ] |
| Post subject: | Steve's first programing lesson |
Thanks, I didn't expect his masters voice. I will try and see how far I'll get, Mike |
|
| Author: | SteveHopwood [ Thu Jan 15, 2015 8:48 am ] |
| Post subject: | Steve's first programing lession |
I forgot we were talking about a script here, which does not have an OnDeinit() function. The code to produce the comments would go at the end of the program. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|