Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
I am trying to modify the attached indicator to perform the following:
1) make start date coincide with the color1, right now the indicator plots the second color (color2) of the series onto the start date and not the first
2) output the date, color, open, high, low, and close of each plotted line in the series. The file would be appended as new data becomes available.
Calc lowest low/use higher time frame trend/avoid spread problem
I'm trying to find some samples of coding that could provide for the following requirements:
In order to calculate placement of a stop I'd like to see coding that for any given time frame the EA could be told the LOWEST LOW (or highest high) during the last X number of bars...and then using THAT price less (or plus in the case of the highest high) X number of pips to set a stop level.
In order for any new short time frame order to be placed in the same direction as the trend of a larger time frame, I'd like to see coding that would allow new orders to be placed on the short time frame chart ONLY in the same direction as the trend of the larger time frame chart. As a simple example, assume an EA attached to a 15 minute chart wants to place a buy order on the crossing UP of MA1 over MA2 (with a stop placed as per the prior question at 5 pips below the lowest low of the last 5 bars) BUT I'm looking for coding that would only place that new order providing that on the one hour chart for that same pair, the current price is above (or below in the cases of a sell) an X period MA.
In order to avoid false openings/closings of orders due to unusual wide spreads, I'd like to see coding that would only trigger order action based on the CLOSE of the current (or even prior bar could be considered) rather than being triggered while a bar is still open. With IBFX for example I've seen spreads that were usually 5 pips often be as wide as 20 pips (and I once even saw 53 pips !). It seems that such wide spread action as often opened a new order because during the formation of the bar the MA's have temporarily crossed...but at the time the bar closed they had NOT crossed thereby leaving me with a buy order in place that was not wanted !
Any code samples to address of these things would be greatly appreciated.
Could you be so kind to help in the following, hope that it will not take a lot of your time and perhaps you will be able to use the files during your trading:
1. EA – YLA – originally it is Your Lucky 1a, I changed it a little bit to be “unknown” by brokers. Kindly add an option of hidden SL and fix a bug with time. Then I backtest it and set special time frame, it takes trades beyond the frame – what is incorrect.
2. E-trailing EA – help you to trail your orders. Its possible to set special TP value and then the EA trail your order thru “trailing step”. But it seams that trailing step is working starting from 5 pips. Is it possible to change the EA with purpose to set the trailing step starting from 1 pip?
Dear coderguru,
It is may be the easiest work in coding to change the color.......I am unable to do it............
Just change the support in a color and resistance in different color of this code.......
Here resistance and support are in similar color.....................
And the objects do not deleted when the indicator is deleted.............
Takeprofit: here i write my formula for my Trailingstop, and that is:
Take the differenz of BBupper - BBlower at the order open time. Then divide by StopLoss in Pips and you have an Factor. Then take the actual BB differenz and divide it by this Faktor. NOW WE HAVE OUR VOLA BB TRAILINGSTOPP!!!!!
SO, my big problem is now to save this FAKTOR!!!! I saved it in th Takeprofit of Ordersend, it works but it is not right!!!!!
And know the 2te Question:
Position Management:
so my order is open and i have my trailing stopp that trails : So and now if the trailingstop is > orderopenprice send next ORDER!!! It's logical because so i can always sicure to risk just my 1 R Risk.
.... if Trailingstopp is > orderopenprice of secondOrder send 3te order.
Please, can you kindly help me to develop an alert on this indicator ( levelstop-Reverse-vB0-4). That is at the arrow(s) point. I'm sorry for any inconvience.
Dear coderguru,
Sonetime ago you developed library cglib.mq4 which contains some useful functions particularly shell functions which allows to generate phone call using skype. And I can't find it published anywhere. Could you please make it available?
In need of a little help - Close then open on same candle
Hello!
I have been working on a new expert and have been learning a lot and making pretty good progress with what I am trying to accomplish but have been stuck with this one major problem for the last few days and can not for the life of me get it right. I know you all get a lot of requests and do your best to help people out and I can not tell you how much I appreciate this!
Anyway, none of the EA's that I program using the Expert Advisor Builder (not to the point where I can write the code myself..) seem to want to open a reverse position after closing another on the same candle even when all conditions are met. I made a simple MA cross EA just to make sure this problem was not with my Buy or Sell conditions for my expert but was the default setting for the coding program. I do not want to add a stop and revese function because the Close (buy) and Close (sell) conditions are not exactly the same as the Sell or Buy, though they are very similar.
For simplicity sake I have attached a simple MA cross EA here that is written using the same source and has the same basic template as the one I am actually trying to fix but is less cluttered and an easier read. If there is anybody who could give me a hand or point me in the right direction by fixing this to be able to open a new trade immediately after closing the prior trade I can not describe how thankful I would be!!
I think your trade logic is waiting for a new bar to execute a trade because of this piece of code in the entry conditions:
Bars != BarCount
The Exit conditions update the BarCount so, for in order for Bars!=BarCount to be true, a new bar has to be painted.
You could add something to the Exit logic to track the Type of trade that was just closed and then use that to override your Bars!=BarCount restriction.
For instance after the OrderClose() function to close an OP_BUY order you could add:
int LastType=1;
Then in the Entry Logic for the Sell Order you could add: