Forum

Can I run my script (EA) in weekend?

Hi. I want for example to calculate the average value for a pair over last week , or maybe something more complicated and I don't want to do it manually. Can I run somehow my script an he can print me in console the value I want ? Do I really need to be during the market hours? Thanks

Correct lot value by currency pair/indexes/stocks

Hello, I'm a bit confused when it comes about calculating lot value as long as I have a fixed profit target per transaction. Supposing I have following: double tp = Bid + ( 80 + spread)* Point ; double profit= AccountBalance () * 0.1 / 100.0 ; double lot = (profit/(spread + 80 ) /( SymbolInfoDouble

15 min chart strategy not working

Hi, What is wrong with my code ? I have strange values for lot size cadjpy, cadchf,audchf pairs for some unknown reasons void OnTick () { double spread = MarketInfo ( Symbol (), MODE_SPREAD ); double adx1 = iADX ( NULL , PERIOD_M15 , 10 , PRICE_CLOSE , MODE_MAIN , 0 ); if (

Average body candle wrong calculation!

Hello, I have the following code: double total = 0 ; void OnTick () { if ( Volume [ 0 ] == 1 ) { Print (CalculateAv()); } } int calculateAv() { for (i== 1 ;i<= 10 ;i++) { total = total + MathAbs ( iClose ( NULL , PERIOD_M15 ,i) - iOpen (

Strange value of calculated lot

Hello there, I have the following formula: int tp= 50 ; double lot = ( 8 /tp)/( SymbolInfoDouble ( Symbol (), SYMBOL_TRADE_TICK_VALUE )); // fyi SymbolInfoDouble(Symbol(), SYMBOL_TRADE_TICK_VALUE) =1 When I print the value of lot is always 0. I don't understand why... Thanks

How can I find the lot size for a trade for a given Symbol, desired profit and stop loss / take profit value?

Hi, I have the following situation: Given Symbol, the desired profit (let's say 20 USD) and : double spread = MarketInfo ( Symbol (), MODE_SPREAD ); double stopLoss = Bid - 30 ; //30 pips double takeProfit = Bid +spread + 30 ; //30 pips How can I calculate the lot size for a potentially buy or sell