Forum

why this code doesn't work

The variable "speed" should display the value of variable "ti" which is 0.00156. But it just displays some random number. Why this isn't working? any format conversion mismatch? double and inters etc? //+------------------------------------------------------------------+ //|

Is there any way that I can display my indicator by 5 second intervals

The code samples shown below draws and displays the chart per new bar, https://book.mql4.com/samples/icustom I want my indicator to be in a separate window and display independently from the main chart. and it should draw fixed details (non-repainting) at 5 second intervals. Which means when the

How to check if last three orders were in loss?

How to check if last three orders were in loss (any buy or sell order ) in order history for the current symbol? and if last three orders are in loss, the variable "last_3_orders" should be set to "1" else set to "0". (Mql4 code) int last_3_orders = 0; string last; for ( int i= OrdersHistoryTotal

How to make williams indicator update every 5 second in 1Minute chart

Usually, when we attach williams percent range indicator to a chart, say 1M chart it just draws and fixes the line per bar. But I want it to fix the line per 5 seconds. In another words, WPR updates the drawn line per bar, I want it to update per 5 seconds. (not 5 ticks, not 5 bars, just per 5

why this code isn't working?

I want to check if total orders are not zero, then, if buy order exists, I want to set the variable "buy_order_exists" to "1" if sell order exists, I want to set the variable "sell_order_exists" to "1" But my code doesn't update the variables when the orders are exist. if ( OrdersTotal () != 0 ) {

why this code doesn't work properly - close orders on certain pips

I made this ea to close all open trades when total pips reach +30, but it doesn't seem to be working, what's wrong with the code? //+------------------------------------------------------------------+ //| close on pips1.mq4 | //|

how to get current total pips in all open trades?

how to get current total pips in all open trades? mql4 and mt4 for a 5 digit broker let's say 1st order has opened at 1.00005 and now it's on 1.00025, and second order has opened at 1.00015 and now at 1.00035, then I want a code to get the current total pips of both trades which is +40, how to do

Does any one have a market hour indicator like this one or similar?

Does any one have a market hour indicator like this one or similar

Xard777 chart trading system - why is this Weekly and Day indicators are showing the same value? error?

Look at the W1 and D1 indicators. I thought it's just a coincidence, but, I looked at it for some time and both of the digits change to the same value. I mean when D1 has 6% the W1 is instantly get to 6% and when the digits go up, say 10% in D1, the W1 value goes to 10% instantly. I looked at other

how to get the highest value of standard deviation for last 2 hours

I'm trying to develop an ea, so far I can understand and write this which will place orders when a new bar opens. int BarsCount = 0 ; int start() { if ( Bars > BarsCount) { OrderSend ( Symbol (), OP_BUY , 0.01 , Ask , 2 , NULL , NULL ); BarsCount = Bars ; }