ejmin ejoni:
hi guys, i need to use this arrays amount, but i dont know the problem, i tried print them on strategy tester but it didnt work
//+------------------------------------------------------------------+ //| dqw.mq4 | //| Copyright 2019, Haskaya Software | //| https://www.haskayayazilim.net | //+------------------------------------------------------------------+ #property copyright "Copyright 2019, Haskaya Software" #property link "https://www.haskayayazilim.net" #property version "1.00" #property strict //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- Print (" Lot: ",lot(10)); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- } //+------------------------------------------------------------------+ double a[11]; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ double lot(int q) { a[0]=0.01; a[1]=0.01; a[2]=0.02; a[3]=0.03; a[4]=0.04; a[5]=0.06; a[6]=0.08; a[7]=0.11; a[8]=0.15; a[9]=0.20; a[10]=0.27; return NormalizeDouble(a[q],2); }
ejmin ejoni: but i dont know the problem, i
double a[];
-
Your array has no size; you can't assign to it.
-
You would know that if you had used strict.
Always use strict. Fixing the warnings will save you hours of debugging, but you must understand the differences.
Mehmet Bastem:
Thank u
William Roeder:
Thank u
-
Your array has no size; you can't assign to it.
-
You would know that if you had used strict.
Always use strict. Fixing the warnings will save you hours of debugging, but you must understand the differences.

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hi guys, i need to use this arrays amount, but i dont know the problem, i tried print them on strategy tester but it didnt work