Forum

Do I need to write magic number?

if I want to run different ea on different chart, so lets say I create "EURUSD" and "USDJPY" this two ea, I open two positions from this two ea, one from "EURUSD" and one from "USDJPY" if I want to change the position SL from "EURUSD", do I need to write magic number to let ea identify it, or I just

why it says wrong parameters count?

bool PosOrdCheck( const ENUM_ORDER_TYPE OrderType) { for ( int i = OrdersTotal ()- 1 ; i>= 0 ; i--) { if ( OrderSelect (( OrderGetTicket (i)))) if ( OrderGetString ( ORDER_SYMBOL ) == _Symbol ) return false ; } for ( int i = PositionsTotal ()- 1 ; i>= 0 ; i--)

Does it matter if I don't put magic number in different ea if I want to put multiple ea of different chart?

because I only open position, I didn't open any pending order , magic number only useful when identify pending order, am I right

why not all control paths return a value?

//+------------------------------------------------------------------+ //| demo.mq5 | //| Copyright 2022, MetaQuotes Ltd. | //| https://www.mql5.com |

I want to do backtest from h1 time frame but it give me daily time frame

int Ema40Handle; double Ema40[]; double Close[]; double Open[]; double High[]; double Low[]; double EntryPrice; double SLPrice; double TPPrice; double LossRatio; double ProfitRatio; bool Bull1; bool Bull2; bool Bear1; bool Bear2; //+------------------------------------------------------------------+

No history data

Why there's no history data