Forum

AFL(Amibroker) signal apperas after few bars

I'm using to a simple intraday stock scanner in Amibroker which generate signal based on High/Low breakout like this H20 = Ref(HHV(C, 1500 ),- 1 ); L20 = Ref(LLV(C, 1500 ),- 1 ); LTP = Ref(C, 0 ); Buy = LTP= H20 AND (PDI( 14 ) - MDI( 14 )) > 25 ; Sell = LTP<= L20 AND (MDI( 14 ) - PDI( 14 )) >

How to limit no of Buy Orders

Hi I want to write a EA that will place buy order at fix price interval like this for (i = 0 ; i < 5 ; i++) { BuyPrice1 = BuyPrice + DPR*(i)/n; if ( Close[ 0 ] >= BuyPrice1) // Buy Order

Bar counter stops after first bar

Hi, I'm trying to find if there are 3 consecutive up or down bars with the below EA the problem is that it stops counting after first bar is complete ( check it on M1) I will be glad if someone could help me here. //-------------------------------------------------------------------- bool New_Bar=

MT4 Scanner need a further look..!!

Hello Guys, I'm trying to create a scanner which should met 2 criteria (i) Last price should be HIGH or LOW of lat 10 bars (ii) Breakout should occur only by 3 continuous up or down bars I've written following code for it (see below) Now problem is that ideally it should work on every bar but it

Time Alert calculation..!!

Hi, I'm trying to generate alert by EA at a specific time in MT4 . What data type I should use before Alert_time to correctly execute the code. extern double Alert_Time = 21.45 ; input string MSG = "Hi, type you msg here" ; bool T = false ;

Time Alert calculation..!!

Hi, I'm trying to generate alert by EA at a specific time in MT4 . What data type I should use before Alert_time to correctly execute the code. extern double Alert_Time = 13.00 ; input string MSG = "Hi, type you msg here" ; bool T = false ;

Need assiatnce in checking Time Based Alert

Hi, I Have written an EA which should generate alert as soon as time exceed the current sever time. My time zone differ from server time by 30 min so I have a condition like if (Cur_time >(Alert_Time_1 - 0.30)) Alert () But Instead of working on Alert time it executes on very next tick. Please show

Need assiatnce in checking Time Based Aet

//+------------------------------------------------------------------+ //| Time Alert.mq4 | //| Akshay Jain | //| https://www.mql5.com |

OrderSend not working

Hi I have a code with Buy & Sell Price both as a function of Bid if (Bid <= SellPrice1) level= true ; if (level = true && Bid >= BuyPrice1 && total< 2 ) // Stoploss order 1 OrderSend ( Symbol (),OP_BUY,Lots, 0 , 0 , 0 , 0 , NULL , 0 , clrNONE ); Since I'm designing it as pyramiding

Need help in checking if statement

I have a certain condition in code where I define the BuyPrice total = OrdersTotal (); if ( Bid >= BuyPrice1 && total < 1 ) // Buy Order 1 OrderSend ( Symbol (),OP_BUYLIMIT,Lots,BuyPrice1, 0 , 0 , 0 , NULL , 0 , clrNONE ); if (Bid >= BuyPrice2 && total<