Forum

Modell on H4? How? Use ask and bid? Combine with lower timeframes as 1M?

Can I modell when something happens on H4 with ask and bid, or maybe by comparing price on H4 with price on lower timeframes as M1

This is an EA with attempt to open positions on ma-crosses with a certain level when to increase the volume, but I can´t run it in the strategytester

on eurusd. #property copyright "Copyright © 2009, MetaQuotes Software Corp." #property link "http://www.metaquotes.net" #define MAGICMA 20050610 double cutlevel= 10 , totalprofit= 0 , volume= 0.1 ; int CalculateCurrentOrders( string symbol) { int buys= 0 ,sells= 0 ; //---- for ( int i= 0

How to code a "time lock" if the last trade was a loss?

I trie to create a time lock with this code but it doesn´t work all the time. Less trades are created, but when looking at the result I can se that there are two losses occuring within a smaller timeframe than the coded time lock should accept. Code explanation: If orderprofit is less than 0 I catch

EA with ma-crosses, chart show profit but code show loss, why?

void start() { double ma, currentcross= 0 , previouscross= 0 ; double cutlevel= 0.03 , totalprofit= 0 , volume= 1 ; double resulttable[ 40 ][ 50000 ][ 5 ]; ArrayInitialize (resulttable,- 12345 ); int a= 0 , iMa= 926 , b= 0 , profitelement= 0 ; string time; for ( int j= 1 ;j< 3

How using Ask and Bid inside a for-loop?

for ( int s= 14400 ;s> 1 ;s--){ for ( int t= 0 ;t< 21 ;t++){ h_cur=High[s+t]; if (h_cur>highest) highest=h_cur; } for ( int y= 0 ;y< 21 ;y++){ l_cur=Low[s+y]; if (l_cur<lowest) lowest=l_cur; }

How to download a new "experts log" or is that done automatic?

The file in my log folder is just an old experts file

OrderOpenPrice() - OrderClosePrice() doesn´t show the correct amount?

In this code I want to test what the values are for the Orderprofit but "OrderOpenPrice() - OrderClosePrice()" just shows 0, why?, isn´t these values not avalible in the demo version or what? (The code below is just a simple code with 3 seconds between OrderSend and OrderClose to illustrate the

Limit and stop parameters can´t be set in the OrderSend-method, why?

Does it depend on which broker you have? Instead I have to set the limit and stop parameters with the Ordermodify-method, why?: OrderSend(Symbol(),OP_SELL,0.1,Bid,3,0,0,"",MAGICMA,0,Blue); OrderSelect(0,SELECT_BY_POS,MODE_TRADES);

Only take a position on a negative trend?

Hi, I want a script that enters the market after X pip (like 25pip) and leave the market at X+1pip+spread or at X-50pip+spread. The script should be able to take both long and short positions. I also want it to enter and leave the market on negative trend, is shall not react on a negativ trend under