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.
Ok, spreads kill some pairs. but is theire away to place trades in the middle of a spreads. This way we can save pips and make more money. i have this code and can it be changed to modify the order to chart price not bid ask?
void PlaceBuyOrder()
{
double BuyOrders, Lots;
double LowestBuy = 1000, HighestBuy;
HELP~just 1 error, use 3 Hours still can't find it out
I AM VERY WORRY , BECAUSE I CAN'T FIND how to correct the error below
can anyone tell me where is the mistake? or help me to debug , i have attached the files, see buttom~ ~
'\end_of_program' - unbalanced left parenthesis C:\Program Files\ MetaTrader\experts\scripts\delete_pending_SAM.mq4 (38, 2)
void delPending()
{OrderPrint();
int ticket =OrderTicket();
result=OrderDelete(ticket);
if (result==False) Print("Error when delete Order ", GetLastError() );
}
I would like a little help with some code logic. I am trying to build an EA of a system I am looking at but am a little puzzled how to write the logic for Buy and Sell Signals. Here is the Pseudo logic of what I want to turn into MQL:
BUY LOGIC:
Code:
If (MA_1 > MA_2) and (Previous(MA_1 < MA_2)) // A moving average cross mean we have a "GET READY" signal
// Once we have a "GET READY" signal the following conditions need to be true
// in order for the system to create a "BUY_SIGNAL".
// Note: the following conditions do not necessarily have to become true on the exact same bar,
but need to trigger true within + or - 2 bars of the "GET READY" bar.
( CLOSE > MA3 ) // Price closes above a MA
( CCI Crosses above the ZERO line ) // CCI crosses up above zero
( Fast Stochastic crosses above Slow Stochastic ) // Stochastic triggers to the up side
The Sell Logic is just the opposite of the buy logic.
I don't need full EA code just the logic converted to MQL 'IF' and 'LOOP' statements to workout the signal. I think I can figure out the OpenOrder code etc... from many examples already in this thread.
Any help anyone can give would be much appreciated.
You're best bet is to look in the metaeditor help file.
Take a look at functions like iMa, iStochastic and iCCI. They have examples and if you combine those with information you'll get from looking at the code in any EA you'll find it easy.
You're best bet is to look in the metaeditor help file.
Take a look at functions like iMa, iStochastic and iCCI. They have examples and if you combine those with information you'll get from looking at the code in any EA you'll find it easy.
Good luck
Lux
Hi Lux,
Thanks for the reply. I can workout out the individual iMA statements etc... the problem i have is how to reference the different time bars once a signal is triggered. For example... If I have a GET READY signal I need to look at the 2 bars before and 2 bars after (5 bars in total) for the other indicators to confirm I have a BUY SIGNAL on the open of the next bar. Not sure if I am making sense !!
I guess it is... how would i structure the necessary FOR loops etc.. when I need to reference bars both before and after the bar being processed.