Forum

Suspend ontick OrderModify if..

Hi guys, How can I suspend ontick OrderModify if my condition it's true? My EA place stop orders and modify it on every tick. If an order entry on market I wish to delete the other ones, and that happen, but maybe ontick OrderModify seems to create other pending orders and I can't suspend ontick

how to..moving pending orders

Hi guys, i can't make updating my pending orders on every price changing, moving following price until 3 sec before news relaese (yeah another news trading ea). I wrote an ordermodify but seems to work just once. i saw many ea on youtube that create moving pending order until news relaese, but i

How indicate ONLY in loss trades

Hi guys, here i am again to ask you an help. As in subject i wish EA close trades after X minute if position is in loss. So i write the following code: void exitloss() { int ExpireX= 60 *MaxHour; for ( int cnt= 0 ; cnt< OrdersTotal (); cnt++) { if ( OrderSelect

Close position after X hours

Hi guys, i'm new and I need your help. I'm writing an EA and I want close position at market after xx hours (maxHour value) if i'm NOT at breakeven..So i wrote like this (long example) for ( int i = OrdersTotal () - 1 ; i >= 0 ; i--) { if ( OrderSelect (i,SELECT_BY_POS,MODE_TRADES))