@xfire just tried that one, and the buy still has no trailing stop, wtf is going on here??????
Posts made by Bsalamone
-
RE: Trailing stop problem, sell works perfect, buy does not please helpposted in Questions & Answers
-
RE: Trailing stop problem, sell works perfect, buy does not please helpposted in Questions & Answers
@l-andorrĂ I tried that and it didn't work, I am just so confused why the sell trades work for trailing stop but my buy trades don't I just don't get it ...
-
RE: Trailing stop problem, sell works perfect, buy does not please helpposted in Questions & Answers
@xfire https://fxdreema.com/shared/ejS95FHIb please help thanks!! or do I need to do a seperate EA one for long and one for short? thanks!!
-
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
I fixed the problem, I had to recode the indicator using the oncalculate function and then I had to comment out #property strict for some reason, so now it works with my mt4 EA
thought finding a winning strategy was going to be easier than this lol!! still need to work on a better strategy but the indicator works with EA now, I will attach it here just incase anyone else wants to use this in their EA 0_1586298751600_bsalVWAP.mq4 -
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
I have not, I will look into it, I am trying to find a volume weighted average indicator that i can use for mt4, I have found a few for mt5 maybe i should just switch to mt5, smh
-
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
@xfire I have been trying to find a better version for days!!! I DONT UNDERSTAND LOL
-
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
when I run the EA it makes absolutely no trades at all ... I have been trying to figure this out for days so very frustrating
-
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
//+------------------------------------------------------------------+
//| VWAP.mq4 |
//| mwfx108 |
//| mwfx108@gmail.com |
//| Like my stuff? Made some profits using it? |
//| Donate ETH @ 0xeDC0D4Dd8abcB106FEdC17Ce07Cc68a6571a038e |
//+------------------------------------------------------------------+
#property copyright "mwfx108"
#property link "mwfx108@gmail.com"
#property version "1.00"
#property strict
#property indicator_buffers 1
#property indicator_chart_window
#property indicator_color1 Red
//+------------------------------------------------------------------+
//| Variables |
//+------------------------------------------------------------------+
double ExtBufferVWAP[];
double __ohlcvTotal,
__volumeTotal;
datetime __sessionStartTime;//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---__volumeTotal = 0;
__ohlcvTotal = 0;
__sessionStartTime = 0;IndicatorShortName( "VWAP" );
IndicatorDigits( _Digits );//--- Drawing settings
SetIndexStyle( 0, DRAW_LINE );//--- Indicator buffers mapping
SetIndexBuffer( 0, ExtBufferVWAP );//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//---// An "Intraday" indicator makes no sense anymore above H1
if ( Period() >= PERIOD_H4 )
{
return ( rates_total - 1 );
}int startIndex = MathMax( 0, rates_total - prev_calculated - 1 );
// Only calculate up until the previous bar. We don't want to calculate the current bar.
if ( startIndex > 0 )
{
for ( int i = startIndex; i >= 1; i-- )
{
double
ohlcAvg = ( open[ i ] + high[ i ] + low[ i ] + close[ i ] ) / 4,
vol = ( double ) tick_volume[ i ];// Reset values when session changed if ( TimeDay( time[ i ] ) != TimeDay ( __sessionStartTime ) ) { __sessionStartTime = time[ i ]; __ohlcvTotal = 0; __volumeTotal = 0; } __ohlcvTotal += ohlcAvg * vol; __volumeTotal += vol; ExtBufferVWAP[ i ] = NormalizeDouble( __ohlcvTotal / __volumeTotal, _Digits ); }}
return( rates_total - 1 );
}
//+------------------------------------------------------------------+ -
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
Important: Custom indicators used in any EA must be programmed in the new MQL4 language. The MQL4 language has changed significantly since build 600 at the beginning of 2014. Old, incompatible indicators include the functions init() and start(), whereas new indicators include the functions OnInit() and OnCalculate().
-
RE: Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
It is not created, I don't have a VWOP indicator that is compatible with EA I do have a simple mt4 VWOP indicator that works fine on chart but not in EA, I have the script for that, I just don't know how to convert the old mt4 it is such a simple strategy but I just can't get this indicator in my EA, helpppppppppp thanks!!!
this is the pine code from tradingview for vwop
//@version=3
study("VWAP", overlay=true)// There are five steps in calculating VWAP:
//
// 1. Calculate the Typical Price for the period. [(High + Low + Close)/3)]
// 2. Multiply the Typical Price by the period Volume (Typical Price x Volume)
// 3. Create a Cumulative Total of Typical Price. Cumulative(Typical Price x Volume)
// 4. Create a Cumulative Total of Volume. Cumulative(Volume)
// 5. Divide the Cumulative Totals.
//
// VWAP = Cumulative(Typical Price x Volume) / Cumulative(Volume)cumulativePeriod = input(14, "Period")
typicalPrice = (high + low + close) / 3
typicalPriceVolume = typicalPrice * volume
cumulativeTypicalPriceVolume = sum(typicalPriceVolume, cumulativePeriod)
cumulativeVolume = sum(volume, cumulativePeriod)
vwapValue = cumulativeTypicalPriceVolume / cumulativeVolumeplot(vwapValue)
-
Problem using old indicator need help on start() vs on calculate()posted in Bug Reports
Please help, I have looked for hours on end trying to find a simple vwop indicator that is compatible with EA, the one I have and the only one I could find is old version meaning it uses on start() instead of on calculate () and the EA does not work at all, I am looking for some help, I want to make a crossover EA with the vwop and a simple moving average, or maybe someone can explain how to either convert a trading view indicator to mt4 for EA or provide me with a simple mt4 vwop, all of the ones I have found include bands and all sorts of stuff, I simply want a regular one I will include a screen shot from trading view, PLEASE HELP THANK YOU!!!!!
Brian
-
IN DESPERATE NEED OF SIMPLE VWOP INDICATOR THAT IS COMPATIBLE WITH EAposted in Questions & Answers
Please help, I have looked for hours on end trying to find a simple vwop indicator that is compatible with EA, the one I have and the only one I could find is old version meaning it uses on start() instead of on calculate () and the EA does not work at all, I am looking for some help, I want to make a crossover EA with the vwop and a simple moving average, or maybe someone can explain how to either convert a trading view indicator to mt4 for EA or provide me with a simple mt4 vwop, all of the ones I have found include bands and all sorts of stuff, I simply want a regular one I will include a screen shot from trading view, PLEASE HELP THANK YOU!!!!!
Brian
-
RE: Simple moving average cross EA PLEASE HELP MEposted in Questions & Answers
I changed the candle to 1 in the condition and it got further, because before i made that change it crashed directly after the sell order was placed, but I am still having the same problem but I cant figure out specifically what to change to get this working properly, I appreciate the help!!! any ideas?? THANK YOU SO MUCH!!
Brian


bsalamone 