Topics
10 May 2019, 10:03
 2442
 11
27 Nov 2018, 07:18
 2790
 6
Replies

alexander.n.fedorov
12 May 2019, 11:53

Best regards

 

Alexander

 


@alexander.n.fedorov

alexander.n.fedorov
12 May 2019, 11:53 ( Updated at: 21 Dec 2023, 09:21 )

Hi, Panagiotis.

All of your comments and suggestions I considered  and used. Thanks a lot. As matter of fact instead of messing with Tick I used Timer.Start (10)

Did not have chance to try in a battle yet, but I think for the portfolio of about 40 pair it wll make a lot of difference in processor occupation.

The fact is even thou I am using Xeon (R) CPU E3-1230 3.50 Ghz with 32 G RAM dedicated VPS if was almost freezing on tick.

So, I think , 10 sec is quite an improvement

I will let you know when the signal comes.

It looks nice too. And the first week of exploatation made me about 5% . It is a lot of improvement in comparisson with the former version

Tell me, if you interested, I could send you a bot. In a mean time I could send you a pic.

 

 


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 17:29

Maybe there are any events, like when the price crosses a certain line (number)

It is available for alerts...


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 17:00

Then I probably have to think about 1 minute timeframe

 


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 12:46

I will explain. It works in a certain way

My Bot is semi-automatic

When I start it it builds Zones of Demand and Supply

While the Bot is working I can place orders

I can put like Buy Limit order, and move the handles to make the SL and TP

then I ModifiyOrder(order, null, null)

in the mean time I record the values of SL and TP into array and delete the old orders (with any volume) and initiate new ones, volume is calculated based on SL

OnTick() everything was changing, so the SL & TP stayed on my VPS only and On Tick () it was checking the SL value and TP value

Then I wanted ot change onTick to OnBar when the candle closes below or above the array number. I also draw lines, to make it visible

First time I tried Mouse even was right click placing the limit order, then left click moving the hadles.

At that point I would think the event would work. But it did not. I discovered that it will work if after the whole procedrure I will click left button on the chart again.

I think it is one of my best bots, if you interested, I could send you the bot and more details

Regards, 

Sasha

 

 

 

 

 


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 11:53

RE:

Panagiotis Charalampous said:

Hi Alexander,

Yes it works when occurs when the left mouse button is released inside the chart area.

Best Regards,

Panagiotis

Thank you, but it does not seem to work

I have a function 

ProcessOrders();

which works perfectly OnTick ()

and does not work on evnet

Regards

Sasha

 


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 11:30

Does this even works only if Mouse on chart?

And relates only to the Chart?


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 11:03

ChartArea.MouseUp 

That is the event .

I just do not know how to grammar it 

Please help

 

Alexander

 

 


@alexander.n.fedorov

alexander.n.fedorov
10 May 2019, 10:38

Panagiotis!

Well, thank you , but it would not help. I will need to change a whole set of parameters, as event occur, and it could not wait for the timer, unless, I make interval very small, which will still keep processor busy.

Are not there any chart events? I just don't know how to use them

 

Regards,

Alexander


@alexander.n.fedorov

alexander.n.fedorov
05 May 2019, 13:00

Supply and Demand

Of course, at the beginning, we could discuss everything on the forum

Regards

Alexander


@alexander.n.fedorov

alexander.n.fedorov
05 May 2019, 12:53 ( Updated at: 21 Dec 2023, 09:21 )

RE:

alexander.n.fedorov said:

To all the community

I was thinking a lot why traditional Bots, based on indicatoros are not working as Holy Grail

After I purchased NinijaTrader 8 withe order Profile Volmetrics, it became crysayl clear:

No matter what your indicators will say, a big fat instittution (BFI) looking at SuperDOM will place a number of contracts (not necesseraly thousands, sometimes it is needed like 10 contracts to move a price 10 ticks - if there is nobody on the other side, equally big and aggressive).  And you can "farewell" to all you indicators.

So? what is working? I think the same thing what is working for BFIs. Buy low and sell high. And that is the essense of Supply and Demand Zones.

So, these are the Zones where BFIs bying, selling or fighting with each other (and I litterally watched that)

Another thing I noticed -  almost a direct correlation between futures and spot. The thing is that the futures volume is real - the data feed comes directly from CME (Chicago Merchantile Exchange).So, if you watch those graphs, you could draw Zones by hand.

I did try to trade according to the principle "sell at supply and buy at demand". So far, I have limited succes.
How to automate it? I decided to use a percentatge of price (like 0.13% is my favorite). I also show the beaten zones (when a bar closes in zone but does not break it). Ticks being very fast in and out would not change the color of the Zone

Then, when the price come close to a zone I put a contertrend order, stop loss - above the Supply or below the Demand, somehow (always different ) Profit Target and wait.

Cause in futures I am a day trader (because intraday margins are small), my favorit timeframe is one hour.

Of course there are a lot of questions left. What should the Profit Target be? Why a zone is good if a depature from Zone is Coming in fast manner? How to predict if a Zone is going to stand? Why the manner of a second approach to the Zone is important? Should the new high (like Russel on Friday) be considered as a Zone. I tend to think "no", cause there is no depature.

The other question: Why would not the Spotware make an arrangement with CME and offer the real futures and options trading?

Anyway. The topic for me seem to be the most promissing, and the most important part of it that you get the real volumes from CME, and use a correlation to build Zones.

Everybody is welcomed to ask questions, but more importantly, contribute to the system.If you serious about working the topic you can mail me at alexander.n.fedorov@gmail.com. Please, put in subject "Supply & Demand" and your message will not go to spam. Leave you direct contacts -like Skype, I will do the same if start working on that together

Best regards,

Alexander

 

 

Sorry for misprints :)

 


@alexander.n.fedorov

alexander.n.fedorov
05 May 2019, 11:05

Thanks, I will try it 

 

Regards, Sasha


@alexander.n.fedorov

alexander.n.fedorov
26 Apr 2019, 13:30

RE:

alexander.n.fedorov said:

Hi Pangiotis,

Could not figure out how to remove objects of certain type (rectangles for example) from chart.

 

Best regards,

 

Sasha

Sorry for the misprint, Panagiotis :)

 


@alexander.n.fedorov

alexander.n.fedorov
25 Apr 2019, 14:02

RE:

Panagiotis Charalampous said:

Hi Sasha,

I haven't tried it but should work for m1 bars.

Best Regards,

Panagiotis

It does not work

this one works:

 barMinutes= (int)ms.OpenTime.Last(0).ToUniversalTime().Subtract(ms.OpenTime.Last(1).ToUniversalTime()).TotalMinutes;

 

Regards


@alexander.n.fedorov

alexander.n.fedorov
25 Apr 2019, 09:28

Should this work:

ms = MarketData.GetSeries(TimeFrame);
int barminutes = (ms.OpenTime.Last(0).TimeOfDay - ms.OpenTime.Last(1).TimeOfDay).Minutes;
int numBarsInDay = (int)barminutes;

 

Regards, 

Sasha


@alexander.n.fedorov

alexander.n.fedorov
03 Apr 2019, 13:49 ( Updated at: 21 Dec 2023, 09:21 )

Hi, TraDerMatTix

Be carefull with using different timeframe then the default is. You may face the same problem
My bot  is supposingly doing good results, and the optimization is nor serving a curve fitting, but rather makes aware of every pair and timeframe characteristik kind of "wavelength"

You have to run a portfolio of a 15-20 instruments.

Optimization should be not done before the date I put for a couple of reasons:

1. Brexit affected all the results in 2016 (checked it)

2. 2 years and a quater give  you rather representative stats on the wavelenth

What  i do first, I do multitimeframe optimization on 1 minute bars, then get the best timeframe based on pre-analysis, the live it overnight on tick in the best timeframe

With the risk structure I put, I normally accept a pair/timeframe if gives me a return of >=60% for 2.25.years. 

 

Then I take the optimized portfolio and consolidate the trades in Excel

This is the kind of curve that I receive

As you cand see with the original deposit of 5K, you should tripple your account in a matter of 4 month.

That should be statistically representative. So, now I am running a live test on Demo

Should find it usefull, you can try it . If you find some improvements, please, let me know

 

Alexander

 


@alexander.n.fedorov

alexander.n.fedorov
02 Apr 2019, 11:59

Hi, Panagiotis.

That is different 

In latest case there is only one timeframe inside the code.

It is  that I was doing optimization using timeframe as a parameter

And it works (using timeframe as a parameter) with other other bots.

 

Regards, 

 

Alexander


@alexander.n.fedorov

alexander.n.fedorov
31 Mar 2019, 18:10

There is very interesting thing I discovered.

If TimeFrame is included into optimization of this algo, then I have all the problems

If I use only one TimeFrame - no problem!

It must be a bug

 


@alexander.n.fedorov

alexander.n.fedorov
31 Mar 2019, 13:56

Hi, TraDerMaTrix

 

I installed the developer pack per your link on a VPS server (dedicated, very good) and on my notebook

Rebuilt the code

Tryid it again on both machines

It is not working. It gives different results

Can you help? You look like you know whay you are doing

 

Regards,

 

Alexander


@alexander.n.fedorov

alexander.n.fedorov
31 Mar 2019, 13:21

Hi, TraDerMaTrix

I really appreciate your concern. I downloaded and installed the the developer pack

But results are the same

May be you could be very kind and call my Skype number:

alexander.n.fedorov

Regards,

 

Alexander

 


@alexander.n.fedorov