| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (2) | Thread Tools | Display Modes |
|
||||
|
Quote:
PHP Code:
|
|
||||
|
Time of stop-loss
Quote:
|
|
|||
|
I'd like to put arrows or text objects or something on the chart while my EA is running to show it's actions, but the objects don't seem to appear. Anybody got a working EA example that draws on the chart?
Also, the Strategy Tester has a button to display a chart after a test is run, but I'm not seeing the arrows. Is this a problem with build 195, because I know I've seen them there in the past. How can we modify these arrow objects? I'd like to make them bigger, but don't know how to get at the chart in the tester either. I guess both problems are the same: getting user feedback from EAs. |
|
|||
|
I have an expert that I'm tweaking and wanted to avoid an entry signal if the previously closed bar was extremely long. (>30 pips) I added the phrase below as a condition but it didn't seem to be recognized. I'm not a good coder but have luck with adjusting experts and am learning as I go. Could someone tell me what logic or phrase I should use here?
Under the section; ----------------------------------- void CheckForSignals() { ----------------------------------- I included the condition; ----------------------------------- if ((Close[1])-(Open[1])<30 ) { buysig=true; ----------------------------------- Thanks for any suggestions, MJ |
|
|||
|
Quote:
Assuming that Close[1] is for instance 1.2835 and Open[1] is at 1.2805 (bullish bar), the difference is 0.0030 so checking against 30 won't work. Furthermore what if Close[1] is at 1.2805 and Open[1] at 1.2835 (bearish bar)? You'll get -0.0030. So first of all you need to use Close[1]-Open[1] < (30*Point) to remediate to the first problem, and then you have to use the MathAbs() function to get the absolute value of the subtraction. In short use: if MathAbs(Close[1]-Open[1])<(30*Point) .... HTH Yannis Last edited by Yannis; 08-31-2006 at 08:41 PM. |
|
|||
|
Code to avoid Long Bar trade entry
Quote:
extern int LBE=30; // LBE is 'Long Bar Entry'. Default could be 30 in the header section of the expert and then use LBE instead of 30 in your line of code? if MathAbs(Close[1]-Open[1])<(LBE*Point) This would allow me to test variant pip settings manually, and to optimize it in back testing. MJ |
|
||||
|
Quote:
try search the word "order" in the "search" tab of the "Navigation" window you will find all function about order to compair with the bar time use Time[0] or iTime(..) function like if(orderclosetime()>Time[0]) blockopen=true; |
|
|||
|
Quote:
Sorry for the late reply, you probably have figured out yourself by now, but yes you are correct. This will allow the user to change the value through the ea parameters without modifying your code. |
|
||||
|
Using Arrays to track info for All Open Orders
Could someone show me a snippet of an array for logging the details for all open orders? I want to be able to track information on all Open orders such as OrderOpenPrice and order profit. Then I would like to use the information in the array to find the minimum and maximum values. I've tried all sorts of thing but nothing seems to work.
Thanks in Advance!!! dee |
![]() |
| Bookmarks |
| Tags |
| histogram, forex, ZUP_v1.mq4 |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/questions/270-ask.html
|
||||
| Posted By | For | Type | Date | |
| OzFx System:) - Page 639 | This thread | Refback | 06-21-2008 10:53 PM | |
| Forex SRDC Sidus Sibkis EA MT4 Forum OTCSmart | This thread | Refback | 12-08-2007 12:46 PM | |