You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please advise.
How to increase trawl step.
Frequently accessing the server trawls every pips.
I need 50 or 100 pips on five digits.
// +-------------------------------------------------------------------------+
// checkTrailingStop function|
// +-------------------------------------------------------------------------+
void checkTrailingStop( int iiPos ) {
// check Trailing Stop and set it to follow the price
double ldblCurrentPrice;
double ldblCurrentSL;
double ldblNewStopLoss;
double ldblSymbolPoint;
long llDigits;
int liDigits;
MqlTradeRequest mqlTradeRequest = { 0 };
MqlTradeResult mqlTradeResult = { 0 };
MqlTradeCheckResult mqlTradeCheckResult = { 0 };
if ( STOPLOSS <= 0 ) {
return;
}
// if there is no open position leave the routine
if ( !PositionSelect( gSymbol[iiPos].gstrSymbol ) {
return;
}
ldblSymbolPoint = SymbolInfoDouble( gSymbol[iiPos].gstrSymbol, SYMBOL_POINT );
ldblCurrentSL = PositionGetDouble( POSITION_SL );
if ( PositionGetInteger ( POSITION_TYPE ) == POSITION_TYPE_SELL ) {
ldblCurrentPrice = SymbolInfoDouble( gSymbol[iiPos].gstrSymbol, SYMBOL_BID );
ldblNewStopLoss = ldblCurrentPrice + STOPLOSS * ldblSymbolPoint;
if ( ldblCurrentSL <= ldblNewStopLoss ) {
return;
}
} else {
ldblCurrentPrice = SymbolInfoDouble( gSymbol[iiPos].gstrSymbol, SYMBOL_ASK );
ldblNewStopLoss = ldblCurrentPrice - STOPLOSS * ldblSymbolPoint;
if ( ldblCurrentSL >= ldblNewStopLoss ) {
return;
1. Insert the code correctly (Ctrl+Alt+M).
2. These lines seem to be responsible for triggering the "trawl":
In case of POSITION_TYPE_SELL the "trawl" is triggered if condition 'ldblCurrentSL<=ldblNewStopLoss' is not fulfilled. Try to change it like this:
And by analogy, for buying.
1. Insert the code correctly (Ctrl+Alt+M).
2. These lines seem to be responsible for triggering the "trawl":
In case of POSITION_TYPE_SELL the "trawl" is triggered if line 'ldblCurrentSL<=ldblNewStopLoss' is not executed. Try to change it like this:
Well, and by analogy, for buying.
Thank you very much I will try it.
Please help me run this:https://www.mql5.com/ru/code/268
I tried to use Wizard to build an EA, but in the list of signals there is no"Signals based on reversal candlestick patterns", as written in the description
I tried to load it completely from codebase into metatrader, expert advisor appeared and I tried to test it on EUR/USD H1 with default parameters but it wouldn't open any order
For more versatility, you can put ldblSymbolPoint instead of _Point:
What is the Users folder, please? It's 76.3% of the C volume at !!!!!!!. And I don't see it listed at all... What a rage! What's in there?
4.94 GB free on the C drive out of 197.9 GB !!! And as if the biggest brother wouldn't tell us that these are our platforms... He's got the most tanks and monsters in the world.
4.94 GB free on the C drive out of 197.9 GB !!! And as if the biggest brother didn't say it's our platforms... He has the most tanks and monsters.
When testing in the tester a critical error OnTick() zero divide by 0.
How to find this very spot in a big Expert Advisor? Is it possible to use notepad?