shyftus / Publications
Forum
iVolume returning static value for every bar
Hi all. Just poking around in MQL5 for the first time. I thought I'd start with something simple, print to the journal on the first tick of a new bar: //+------------------------------------------------------------------+ //| learning.mq5 | //|
Issue with MarketInfo(NULL,MODE_SPREAD) on live account
double Spread = MarketInfo ( NULL , MODE_SPREAD ) / 100000 ; double COpen = iOpen ( NULL , 240 , 0 ); double P2Low = iLow ( NULL , 240 , 2 ); double BuySL = P2Low - 0.0001 ; double BuySLDist = COpen + Spread - BuySL; double BuyTP = COpen + Spread + BuySLDist * 6 ; Above snippet works fine in
Backtesting bug? Massive profit miscalculations (Build 1031)
Hi Everyone, Backtesting an EA and have noticed some incredibly strange profit results: Long trade is trailed out 4 pips above the entry price but results in a $67 loss Commission charge is only .7 pips, so should still be a 3.3 pip profit. Account is in USD and lot size .21 = $2.10 / pip. Any idea
EA Won't Issue Sell Order - No Error
Hi trying to transition to actual coding from modular interface - have managed to code long side OK, but have made a mistake somewhere with the sell function ... can anyone spot? Imagine it's a pretty simple/obvious mistake. I'm not getting any order send errors. Cheers. #define __STRATEGY_MAGIC
Possible to adjust 'Defaults' fib setting?
Hi everyone, Someone recently showed me how to put in the price descriptor '%$' on fib tool which is awesome and I also like to use 78.6. On other hand, I often delete lots of fib levels on individual charts so they are more pleasing visually / less noisy: Problem is, when I go to use the fib tool
Order Modify Error 130 - Invalid Stops
Hey MQL4ers Having trouble with my trailing stop function . Can someone please clarify ALL situations that lead to this error? Aware of traditional Stop too close to market which is definitely not issue and stop in wrong format, which should also not be an issue... I don't think I need help with
What's wrong with this code? (Trade once per bar)
if ( Bars != ThisBarTrade ) ThisBarTrade = Bars ; if (_AND && !__isExist( 0 ))_Open_Position = OrderSend ( Symbol (), 0 ,_Arithmetic, MarketInfo ( Symbol (), MODE_ASK ), 0 , MarketInfo ( Symbol (), MODE_ASK )- MarketInfo ( Symbol (), MODE_POINT )* 35 , MarketInfo ( Symbol (), MODE_ASK )+
Noob Code Problem
Trying to follow a tutorial on coding a simple MA x but I've run into issues before I've even got into the thick of it... it's 430am here so I'm probably just missing a ; or something but could use a second pair of eyes... the problems on the "for" says expression can not be used on global scale
Tick Scalpers/Good Brokers/Fixed Spreads
Lots of programmers who make tick scalpers say you need "a good broker with low, fixed spreads", no order restrictions etc... now I've hunted and hunted but I can not find any brokers who fit that description. From what I can see you can either get low variable spreads or crappy fixed ones... so are
Incredibly Annoying Date Range Bug In Strategy Tester - Solution?
Hi everyone first post. There's a bug in strategy tester where it flat out refuses to test the date range you've selected and goes with just a small portion of it. No doubt we've all experienced it - is there a fix? I understand why it happens when there's a chart problem ie not enough bars in