| / | Forum |
|
viola
2008.08.18 09:05
Hi All, Thanks |
|
Interview with Harry Brinkhuis To my findings a Take Profit of 42 and a Stop Loss of 84 is the right combination for Phoenix. They are part of what I call the balance between settings, timeframe, Stop Loss and Take Profit. Other people that were testing Phoenix tried to change Take Profit and Stop Loss and got very different results. They somehow changed "The Balance"! |
|
phy
2008.08.18 14:33
external int test= 1; int start(){ Print("Test = ", test); // prints out "Test = 1" test = 2; Print("Test = ", test); // prints out "Test = 2" return(0); } |
|
viola
2008.08.18 17:45
phy wrote >>
external int test= 1; int start(){ Print("Test = ", test); // prints out "Test = 1" test = 2; Print("Test = ", test); // prints out "Test = 2" return(0); } Thanks phy, but if i switch to a different time frame or close and reopen metatrader or click on smiley face, in all those cases that variable shows the old value 1, the one it got during initialization. How do i change it to a new value? Somewhere it stores those variables, when i click on smiley face and change it, EA will keep it even if i close and reopen EA. There should be some kind of methods, to set the value, similar like for the global variables GlobalVariableSet(). |
|
phy
2008.08.18 17:56
Probably being stored in the chr file in the Profile. |
|
viola
2008.08.18 18:39
Thank you phy, I tired to search for a file which possibly has data from external variables, didn't find.
If I have two pairs in my account running the same EA, one pair is done for the day, and second is still allowed to place more trades. Where can I store that variable 'done for the day' and not lose the value if I switch for a minute to a different time frame?
Thanks |
|
phy
2008.08.18 18:49
GlobalVariableSet() can store doubles outside the EA itself. |
|
viola
2008.08.18 19:00
Thanks phy, but GlobalVariableSet() will store the value for a global variable not instance variable, one value in that variable for the whole system, let say I have $DoneForTheDay global variable, and set it to true. Then it will be true for all instances for the EA (for all pairs). If only one pair is done for the day and the other pairs are not, then I need to keep different values for each pair, same way as I have external variables set differently for each pare. |
|
phy
2008.08.18 19:27
You can do it... --- if(some condition is true) GlobalVariableSet(Symbol()+"_DoneForDay", 1); --- if(GlobalVariableGet(Symbol()+"_DoneForDay") == 1) return(0); |
|
viola
2008.08.18 20:40
phy wrote >>
You can do it... --- if(some condition is true) GlobalVariableSet(Symbol()+"_DoneForDay", 1); --- if(GlobalVariableGet(Symbol()+"_DoneForDay") == 1) return(0); Thank you phy! |