피고용인의 피드백
고객의 피드백
Hi all, the simple script im currently using has the below functions Ontick:
- Takes the Bid or Ask price of the current chart pair.
- Opens/Creates a new bin file.
- Stores that Bid or Ask price at the BOTTOM of the bin file
- Reopens the bin file to read it
- Stores it into an array in order to be manipulated
I would like to be able to limit this file, because obviously right now the file just keeps getting bigger, to a certain number of lines (circular buffer?)
So that at the current tick, and lets say maxsize = 5, the file looks like this:
-E, D, C, B, A (A being the oldest bid/ask price stored at the end of the line)
on next tick
-F, E, D, C, B (A deleted and F inserted as the most recent tick price)
The code is the below:
void OnTick()
{
double PriceDiff = MarketInfo("AUDCAD",(MODE_ASK));
int fileHandle2 = FileOpen("Myfile.bin",FILE_BIN|FILE_READ | FILE_WRITE);
FileSeek(fileHandle2, 0, SEEK_END);
double data2 = PriceDiff;
FileWriteDouble(fileHandle2,data2);
FileClose(fileHandle2);
double arr[];
string path= "";
ResetLastError();
int file_handle=FileOpen("Myfile.bin",FILE_READ|FILE_BIN);
if(file_handle!=INVALID_HANDLE)
{
FileReadArray(file_handle,arr);
int size=ArraySize(arr);
for(int i=0;i<size;i++);
Comment("Total data = ",size);
FileClose(file_handle);
I hope the explanation is clear enough, if not we can discuss further.
Thanks in advance
Chris
비슷한 주문
I am looking for a developer to create a script for MetaTrader 4 (MT4) that automatically reconnects to my broker account when the connection is lost. The script should continuously monitor the connection status and reconnect without requiring manual intervention whenever the platform is active but disconnected. The goal is to maintain a stable and uninterrupted connection to my account. If possible, the solution
Hey there, interested in your services for merging 2 pinescripts into one Ninjatrader Strategy. I have attached both scripts below and both will be running on Renko Charts. I added entry examples in the attachment as well. For this, I would like to add some user-defined variables such as Stop Loss and Profit Targets, or allow it to sync with my ATM strategies. Please advise if this would be possible. Additional
I'm looking for a skilled developer to help build a custom trading strategy for NinjaTrader 8 (N8). The project involves developing and fine-tuning a strategy tailored to specific market conditions. Experience with NinjaScript, strategy optimization, and backtesting is highly preferred. If you're available and have expertise in N8 strategy development, please get in touch to discuss further details
I have a python script that connects MT5 to Deriv for binary trading which is having some bug. It stops executing trades after a while. I need someone to check the code and fix it. Negotiable price
I currently have a Forex trading script in .txt format that I want to be converted to a functional/working robot (in .mq4), without altering the strategy of the script. The strategy of the script is already in and shouldn't be changed unless with mutual understanding