You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
May the pips be with you :)
Gooly
I solved my long-standing problem helping out with this. It was how to use file to communicate between indicator and expert advisor {which is in testing mode}. Because of the file access limitation testing vs real, I kept thinking that the only way to solve the problem was dll. or post message. However the simple solution is just FileOpenHistory().
I created the f_function for these purposes. 1) Create as many [Global_Scope_Variables] without taking up memory. 2) Having my [Global_Scope_Variables] Restart && Shutdown resistant. Any comments on if it's achieving this would be appreciated. Also, if you like the idea feel free to use it :-)
Expert Code:
Indicator Code:
I solved my long-standing problem helping out with this. It was how to use file to communicate between indicator and expert advisor {which is in testing mode}. Because of the file access limitation testing vs real, I kept thinking that the only way to solve the problem was dll. or post message. However the simple solution is just FileOpenHistory().
I created the f_function for these purposes. 1) Create as many [Global_Scope_Variables] without taking up memory. 2) Having my [Global_Scope_Variables] Restart && Shutdown resistant. Any comments on if it's achieving this would be appreciated. Also, if you like the idea feel free to use it :-)
Expert Code:
Indicator Code:
Hi ubzen,
You really amazing! I like your diversified thoughts, seems you have found out all solutions to solve this issue!
I tried all 3 methods, 1 and 2 are simplest and easy to understand, 3 is some kinda comlicated, because FILE function is a new thing for me =P
All I can suggest is maybe we can delete " Print("TimeCurrenti="+TimeCurrenti);" as below because it's duplicate and result is wrong.
But I still have another question please, if we don't have original code of EA, how can we realize it?
For example, I have a visual simulator to manually place orders in tester, and I also have an indy to show how much time left in current bar, which needs information of Timecurrent(), yes of course it's useless in tester, but do you have any good suggestion to solve this problem? I appreciate your kind help very much!
to Gooly, thanks for openning this thread, I really learnt a lot!
Jane
For example, I have a visual simulator to manually place orders in tester, and I also have an indy to show how much time left in current bar, which needs information of Timecurrent(), yes of course it's useless in tester, but do you have any good suggestion to solve this problem? I appreciate your kind help very much!
Unfortunately, you wouldn't be able to use the methods I provided without the Expert codes. If you have the Indicator's code then the best I can think of is using Time[0]. You wouldn't be able to get time-of-every-tick. One-minute open times would be the closest resolution you can get by default [ unless you're using tick data ... then I dunno how it'll play out ].
Thanks for the kind words. Yeah that Print should have been Print("TimeCurrenti="+TimeToStr( TimeCurrenti )); [ to make it more reader friendly ]. It works if you look under the Terminal Journal > Expert Tab [ Does not work in Tester's Log -for Obvious reasons ]. That print was for my debugging and forgot to remove/format. The codes above were not optimized [lots of duplicates].
Unfortunately, you wouldn't be able to use the methods I provided without the Expert codes. If you have the Indicator's code then the best I can think of is using Time[0]. You wouldn't be able to get time-of-every-tick. One-minute open times would be the closest resolution you can get by default [ unless you're using tick data ... then I dunno how it'll play out ].
Thanks for the kind words. Yeah that Print should have been Print("TimeCurrenti="+TimeToStr( TimeCurrenti )); [ to make it more reader friendly ]. It works if you look under the Terminal Journal > Expert Tab [ Does not work in Tester's Log -for Obvious reasons ]. That print was for my debugging and forgot to remove/format. The codes above were not optimized [lots of duplicates].
There is a possibility, but it's a bit complicated.
Run the EA, save a detailed report, copy all trades to Excel of LibreOffice and create text-strings ready to copy like:
Copy all these 'string-trades' into a new empty EA with all your time-Objects and run that on the same backtest-period.
You can as well create orders (in and out) instead of Arrows.
Hope it helps, Gooly
Gooly,
Sorry I don't quite catch the points, you said "Run the EA" , which EA? the EA of ubzen or the EA of my visual simulator?
Jane
well yes you can but you don't need.
Create in the editor a new EA and put in the start()-function all the lines with the arrows - may be like this so they are not drawn again with each new tick:
Now 'back-test' this EA. I'll draw the labels when the original EA has trades and it show the time. That's what you wanted - no?
The problem is the trades of the original EA are written to the report without seconds!
So need to slow down the speed and watch when Bid or Ask hits the price-lables.
Gooly
Ah, I know what you mean, that's really a creative idea.
But still have problem, because I want to manually trade with visual simulator and that means I need to know how many seconds left FIRST , THEN place order.
But that's okay, I'm trying to find another simulator which can provide mq4 file.
Thanks all the same for all help you provided, very appreciate that!
Jane