| 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 (1) | Thread Tools | Display Modes |
|
|||
|
Variable Storage
I have an indicator that creates objects (arrows) during certain events on my chart.
Let's say 3 arrows have popped up on the 1 min chart, and then I click on 5min and back to 1min..... the arrows have disappeared!!! Is this a variable storage problem? Here's some code... PHP Code:
![]() |
|
||||
|
Glad you figured it out.
![]() I was just throwing some ideas, I wasn't sure if they would work or not. I was thinking something like this so sound only played once: bool Play_Sound; if ((latestlatestmain >= 0) && (latestmain < 0)) { Play_Sound=true; } if (Play_Sound==true) { PlaySound("alert2.wav"); Play_sound=false; } Maybe? |
|
|||
|
Thanks Wolfe, I was thinking along those lines too,
I ended up using something similar but using an array! Appreciated your time mate. For anybody who might be able to help with my new problem posted above, it'd be much appreciated. I'm trying to have it draw arrows on my chart during a certain event, which I can get done. But somehow I'm storing and initiating the script wrongly, as the arrows that have previously been set on the chart does not stay there (they disappear) when I click to change Timeframes. Any Ideas? ![]() |
|
|||
|
Code one trade per certain time?
need help with a code?
heres how it works: only open a certain # of order per time (lets say 3 am - 6 am) or day or week will not open another trade even though it creates a signal within that time Last edited by antone; 10-24-2007 at 05:01 PM. |
|
||||
|
Here is the ea that I am having with and the indi's I have called it The Abyss due to that's where I am trying to learn to code. lol
![]() I am currently looking into these 2 errors on this site and the MQL4: automated forex trading, strategy tester and custom indicators with MetaTrader site. 2007.10.24 21:22:24 1998.11.20 06:00 The Abyss GBPJPY,Daily: OrderSend error 130 2007.10.24 21:22:24 1998.11.20 06:00 The Abyss GBPJPY,Daily: invalid double number as parameter 6 for OrderSend function Could some one please have a look at the code and let me know what I have done wrong and how I could fix it. Any help would be great Cheers Beno |
|
|||
|
Quote:
example it will only trade one order in 5 am - 10 am but can trade again in another time.. |
|
||||
|
When using icustom in an EA how do you determine which buffers and index's to use. e.g. if I was trying to get an up or down trend from silvertrend indicator or similar. I might not be using the right terminology but hopefully you get where I'm coming from.
#property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Blue #property indicator_color2 Red //---- input parameters extern int RISK=3; extern int SSP=9; extern int CountBars=350; //---- buffers double val1[]; double val2[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(2); SetIndexStyle(0,DRAW_HISTOGRAM,0,2); SetIndexStyle(1,DRAW_HISTOGRAM,0,2); SetIndexBuffer(0,val1); SetIndexBuffer(1,val2); |
|
||||
|
for this codes it will be like that :
The buffer that is used is bolded. After the buffer we have the shift. Code:
iCustom(NULL,0,"silvertrend",RISK,SSP,CountBars,0,0); Code:
iCustom(NULL,0,"silvertrend",3,9,350,0,0); Kale
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
|
||||
|
It is very simple, You need to check order open time of last order in history and then check the day with TimeDay function. If it is today then do not trade.
__________________
You need proffesional mql coder? Contact me! I will help you! ........................................ http://www.fxservice.eu/ ........................................ |
![]() |
| Bookmarks |
| Tags |
| candle time, CHinGsMAroonCLK, coders guru, expert advisor, forex, how to code, I_XO_A_H, mechanical trading, trading |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
|
||||
| Posted By | For | Type | Date | |
| Need an experienced programmer? - Page 2 | Post #0 | Refback | 09-24-2008 07:24 AM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 05:22 PM |