| 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 |
|
|||
|
I am trying to code an indicator to change the indicator color using a "if" conditional statement with no success.
PHP Code:
Can anybody help?? Dave <><<< |
|
||||
:: you can't use "property" in a code, just use "color" to a normal variable name in your if statement. like... color indic.1=Lime
__________________
..4.Nov.08.. IN10TION newsReader v09.85 Lite - the best news reader on your chart
Last edited by IN10TION; 09-05-2008 at 11:02 PM. |
|
|||
|
Locking in first initial value of OrderOpenPrice()
Does anyone know of a way to lock in the first occurrence of the value of OrderOpenPrice()?
for example double x=OrderOpenPrice(); but I never want the values to change upon sale of the order or renewing the order I need x to act as a reference point any help greatly appreciated thankyou |
|
|||
|
You could either write the price as a comment then move it to each order until such time as you want to change it, use a global variable or write to file.
Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This |
|
|||
|
Trying to get swing high/low code to work on patterns other than pins
Hi,
I have an EA that calls an indicator which tells me if the price is at a swing high/low. It works fine on the current bar, so for e.g if its a pinbar and its at a swing high/low then my EA creates a buy/sell entry. Its works great as long as my EA picks up pinbars. But its no good if I need to make the entry on say an inside bar at a swing high/low because the high/low bar as passed. This code will work for the close of the first bar but I need the code to work for close of the second or third. In other words I need a way for my EA to remember that the price is at the high/low for a few bars after the high/low. (prevtime != Time[0]) { DeleteSellLimit(); } prevtime = Time[0]; |
|
|||
|
PHP Code:
Right now, both Color(s) 1 & 2 show 'black' on the graph!! Can any expert Guru help me solve this issue??? Thanks in Advance! Last edited by Dave137; 09-11-2008 at 03:24 AM. |
|
|||
|
instead of having startcolor as a string have it as a color
Lux
__________________
Build An Expert Advisor. FREE E-course As Seen On TV ![]() ForexArea.com Users of Gap Trader from 'Forex-Assistant' MUST Read This |
![]() |
| 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 |