Forum

How to Draw a Reference Lines Every 10 Pips

Here's a handy script I use all the time. It draws reference lines every 10 pips to help me gauge movement in the market. I was really frustrated trying to figure this out by looking at the prices on the right-hand side of the screen so I created a script. The script could be a good for beginners to

Standard Deviation Channel information

I would like to find the price difference between the outer lines of a Standard Deviation Channel. The points that are marked A and B. I can find the price and time of the center line but this doesn't seem to be helpful. I've also explored using iStdDev. Does anybody have an answer how to find the

additional OP_SELLSTOP or OP_SELLBUY ???

I would like to add another sell stop / buy stop to take some profits early. I am placing an order with a take profit and stoploss with code something like this orderResult= OrderSend ( Symbol (), OP_BUYSTOP ,lotAmount,somePrice, 3 ,someStopPrice,someTakeProfitPrice, "" ,Magic, 0 , clrGreen ); Next

Trouble with Global Variable

I can't retrieved a Global Variable in an EA. First I am setting a Global Variable with a script. Then I am attempting to read the Global Variable in an EA. Here is the code and errors. What is wrong? script... int start() { int testVar; GlobalVariableSet (testVar, 12345 ); // set the global

How to manage multiple accounts and EA's

I'm interested to know the best practices for managing multiple accounts and multiple versions of EA's. I've been working with the Demo account for years and now have become profitable and will start working with a Real account as well as the Demo account. Should I install two versions of MT4 -- one

Strategy Tester Giving Strange Results

I was using the strategy tester last year without difficulty. Now I can't seem to get it to work. It's a new installation and an upgrade to build 625. Bars just won't appear in the chart. And I indicate the spread should be 2 pips yet Mt4 claims the spread is 140 pips spread. What am I doing wrong

MODE_STOPLEVEL returns 0

Shouldn't this line of code returned something other than zero? Print ( "Stop level in points=" , MarketInfo ( Symbol (), MODE_STOPLEVEL )); For me it simply returning "0" rather than the minimum stop level. I thought perhaps the stop level really was 0, (OANDA is my broker) so I tried setting my

How to take partial profits -- OP_SELLLIMIT?

I'm not sure how to take part of my profits at a price before Take Profit line of an order. I place an order with code that looks something like this... OrderSend ( Symbol (), OP_BUY , 0.10 , Ask , 3 ,stopLoss,takeProfit, "" ,Magic, 0 , clrGreen ); And then when the price reaches 10 pips I

Changing the number of Bars on screen?

Is there a way to programmatically change the number of bars on the screen -- shrink or grow the chart horizontally

Learning about Order processing - Indicator displays total profit/loss for past 24 hours.

Hi All, I wanted to learn more about order selection and processing so I wrote this indicator. It displays the profit or loss of the past 24 hours (or whatever time period you like). Two areas for improvement are: it should run each time an order closes rather than when each bar closes. It should