Tuesday 18 December 2012

code untuk detect new candle


Para suhu,

Newbie minta tolong, kalau membatasi open order tidak lebih dari 1x per hari sudah bisa, tapi kalau membatasi open order tidak lebih dari 1x/2x (bisa diset) per candle bisa tidak ya?
Jadi misalkan dalam 1 rentang trend ada 10 candle, saya bisa open order masing2 1 order di setiap candle. 

Kalau bisa minta tolong scriptnya...

Terima kasih,
untuk satu trade per candle mungkin bisa dibuat supaya ordernya hanya saat candle baru. code untuk detect new candle seperti ini:
Code:
void Fun_New_Bar()
  {
   static datetime New_Time=0;
   New_Bar=false;
   if(New_Time!=Time[0])
     {
      New_Time=Time[0];
      New_Bar=true;
     }
  }

No comments:

Post a Comment